-
Notifications
You must be signed in to change notification settings - Fork 927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Documentation request] How to add a new ISA target? #28
Comments
Basically, all you have to do is provide vectorised implementation for 4 functions:
As a starting point, you can see how @fitzsim added POWER9 support:
You don't necessarily need to fit your implementation into the Regarding FP16 <-> FP32: when no native instructions are available, currently the code fallbacks to this: https://github.com/ggerganov/ggml/blob/master/src/ggml.c#L163-L237 This should work, right? |
I got a NEC VectorEngine Co-processor which uses the "ve" ISA which operates on 16348 bit vectors. This target is not yet supported by this library however depending on the effort for porting it might be an interesting library (although it only supports 32 bit floats). The vector engine can either execute programs natively or it can be used for offloading.
How would one go about adding support for a new ISA in this library?
If the ISA docs motivates people familiar with the library to port it to target more then the idea of documenting how to add a new i can give access to hardware running that ISA.
If i read the code correctly instead of "GGML_F32Cx8_ADD" the implementation would use "GGML_F32Cx512_ADD" which is as fun as it sounds. ve provids a VL register which can be used to change the vector length at run time which can be useful for the last loop iteration. The FP16<->FP32 conversion is not supported by the VectorEngine architecture.
The text was updated successfully, but these errors were encountered: