Comments (3)
Yeah for sure. Was thinking about this a little bit and I think the easiest thing to do would be:
- When querying the type of an argument where this applies, manually enforce the correct rule by say expanding here: https://github.com/wsmoses/MLIR-GPU/blob/d18dce36513bebef5060adc786115a85593f461d/mlir/tools/mlir-clang/Lib/clang-mlir.cc#L2690
- Whenever calling a function do a check for the type to do a memref cast from the default clang convention to our new convention (allowing us to not have to change the definition of how the rest of the AST is lowered)
- When starting to emit a function, immediately cast to the clang convention pointer.
In theory this should be sufficient to be correct when combined with everything else and maintain the calling convention in the function declaration. Hopefully it should also allow existing optimizations to propagate versions of the type with the extra information whenever its used.
from polygeist.
Yes indeed we can. The reason for this is that the Clang AST actually represents this as *[300 x double], stripping the last dimension. However, we don't need to adhere to Clang's precise definitions so long as we remain consistent
from polygeist.
Yes indeed we can. The reason for this is that the Clang AST actually represents this as *[300 x double], stripping the last dimension. However, we don't need to adhere to Clang's precise definitions so long as we remain consistent
Thanks! Would you mind pointing me how I can lift this limitation? I could create a patch for that, maybe add a switchable option.
from polygeist.
Related Issues (20)
- Cgeist outputs something strange HOT 6
- How to run PolyBench/C benchmarks with polyhedral pluto optimization using Polygeist? HOT 3
- [Bug] Incorrect scf.for code is generated
- Sign extension not properly propagated to users HOT 2
- declared char constants emit higher bit-width MLIR constants HOT 3
- linker error with cgeist on C++ code HOT 2
- make[1]: *** No rule to make target 'install'. Stop. make: *** [Makefile:555: install-recursive] Error 1 CMake Error at tools/polymer/CMakeLists.txt:28 (execute_process): execute_process failed command indexes: 1: "Child return code: 2" HOT 1
- support for Cuda 12.1 HOT 11
- Incorrect execution result of running CUDA to OpenMP compilation? HOT 1
- Error compiling code with Polygeist: 'affine.for' op operand cannot be used as a symbol
- [bug] Operations such as "|=", "&=" and "^=" lack necessary implicit type conversions
- opaque attribute handling issues
- error when trying to lower .cu file, should I report this here or on LLVM repo issues?
- Problems about fp_16 in CUDA, as half, __hmul.......etc HOT 1
- Is it possible to take MLIR generated by CUDA-to-CPU flow to the cpu-openmp executable? HOT 1
- Add Support for Additional Math Operations in Polygeist
- gitignore bug
- Polymer with -reg2mem -pluto-opt generates IR with out-of-bounds accesses for imperfectly nested loops
- When a class is deleted, the user-defined destructor is not invoked. HOT 3
- Runtime error after compiling CUDA programs using cgeist HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from polygeist.