Adding New Arch Support
Things to know
If you found that the CPU you are using has the Simd instruction Hpt is not supported and you are willing to add support for that instruction like avx512f.
How
All the Tensor operations are using implementation from
hpt-types/scalars/andhpt-types/vectors/arch_simd.The folder
vectorsdefines the simd vectors for simd registers with different size of bits. If your simd register is using128-bitand the instruction is not supported. You will want to go toarch_simd/_128bitfolder, create new folder for the new arch.The folder
scalarsdefines the scalar computations. Most of the time you don't need to do anything on this folder unless for some scalar computation, your CPU has special instruction to perform that computation.The file
convertion.rsdefines the type conversion traits and uses proc_macro defined fromhpt-macroscrate to auto implement the type conversion. If your CPU has special conversion instruction, you may want to go to thehpt-macrosand modify the macro code. The fileinto_scalar.rsis just using the method fromconvertion.rs, you won't need to worry about this fileAfter you finished all the steps above, you can start to run the hpt-tests crate and make sure all the tests passed.
Make a pull request.