llvm / circt

Circuit IR Compilers and Tools
https://circt.org
Other
1.66k stars 294 forks source link

Can offload loops with simple memory access to FPGA/GPU? If request for offload (such as `#pragma`), give compiler errors (such as `static_assert` does) if the loops use memory access patterns which can not map to GPUs? #7385

Open SwuduSusuwu opened 2 months ago

SwuduSusuwu commented 2 months ago

... (or, if can not output a loop to GPU, just fall back to CPU.) https://tilera.github.io/llvm/ can output to 64/72 core Tilera (TILE-Gx) CPUs. Most GPUs now have GPGPU memory access; wish to use normal C++ (with offloads to GPUs.) OpenCL just has a subset of C (since OpenCL requires that the program is compatible with GPU memory access.) OpenMP does not output to GPUs. LLVM is so general-purpose that it can output disassembled code back to C++, thus should not be too difficult to output loops to GPGPUs. Was Assistant which suggests to ask llvm/circt for this: https://poe.com/s/2XnsaFB2dYXAvuRh1c1i

uenoku commented 2 months ago

I don't think offloading is related to CIRCT at least at this point. LLM's answer is not correct in various aspects. I recommend you to check llvm/offloading or openmp gpu offloading project.

SwuduSusuwu commented 2 months ago

I don't think offloading is related to CIRCT at least at this point. LLM's answer is not correct in various aspects. I recommend you to check llvm/offloading or openmp gpu offloading.

The Project is much more close to this, but do not know if Projects have an interface for Issues: https://github.com/orgs/community/discussions/133467

SwuduSusuwu commented 2 months ago

Found https://github.com/orgs/llvm/projects/24/views/4?pane=issue&itemId=47236466 which references a "meeting" about GPU offload, all it has is that such "meeting" is to exist (on GitHub? Or at an office? Am confused)