-
Notifications
You must be signed in to change notification settings - Fork 156
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
SIMD targets for Clash? #235
Comments
@chadbrewbaker I would rather emit something with more abstraction than AVX512 assembly; just like Clash emits VHDL/Verilog instead of an EDIF netlist (or even GDSII), so that we can get optimisations from compilers that are used to getting things down to the bare metal. So clash could emit the C-code that you posted, along with all kinds of pragma's or whatnot so that the C-compiler will generate the AVX512 instructions. In principle, this could be as simple as adding a C code-generator I guess... but it would have to rearrange the current IR, such that data-dependencies are executed in a sequential order; and probably a whole lot of other things. |
The best target currently would be ISPC, http://ispc.github.io It's C with a few constructs to denote parallelism. Another target would be OpenCL C, which also compiles to FPGA, but is dodgy at getting use of SIMD units on CPUs. |
As a side note, I would find it thoroughly hilarious if Clash supported compiling to something like this. It's a very appropriate inverse to something like Vivado HLS which turns C into RTL, especially considering Haskell is nicer than C for hardware :) |
Move non-Vivado jobs back to public runners
Listening to Ed's ZuriHac talk, how hard would it be to goose Clash so that it emits AVX512 assembler?
Something as simple as adding two vectors would be extremely useful:
The text was updated successfully, but these errors were encountered: