Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
3 major things:
https://discuss.tvm.ai/t/hybrid-variables-on-cuda-should-have-local-scope/1510
Follow up these issues cast by @vinx13, now hybrid script should inject the thread extent attribute right under the first global scope of the variable and as outside as possible to work around the attached scope problem.
Follow up the issue cast by @Laurawly, essentially this issue is because TVM has NO abstract to access CUDA registers. If you are writing CUDA, you can just do what it is in normal C++, defining local variables, but in HalideIR there are no variable variables.
To avoid confusing further users, now compiler will throw error and hint: defining local variables under a
bind
body is not allowed, and define an array of scratchpad is encouraged.1 minor thing:
Rename
var_decl.py
topreprocessor.py