Skip to content

Conversation

@Sharp-Edged
Copy link
Contributor

Started decorating CUDA shadow variables with the shadow_name CIR attribute which will be used for registering the globals.

@Sharp-Edged Sharp-Edged changed the title Decorate global CUDA shadow variables with appropriate CIR attribute. [CIR][CUDA] Decorate global CUDA shadow variables with appropriate CIR attribute. Mar 11, 2025
@bcardosolopes
Copy link
Member

There's also a conflict to be fixed.

@Sharp-Edged
Copy link
Contributor Author

Ok, I moved some stuff from OG I needed which should handle mangling global variables like device while compiling on host. One problem is that OG's CodeGenModule has a member 'PreprocessorOpts' which I don't know the equivalent of in CIR, so I didn't port the entirety of the code (that is also for some HIP code). The other problem is that I can't really write tests for this because the name difference seems to mostly be in HIP global variables, and I'm concerned with CUDA.

@bcardosolopes
Copy link
Member

One problem is that OG's CodeGenModule has a member 'PreprocessorOpts' which I don't know the equivalent of in CIR

It needs to be introduced, we should keep the skeleton and llvm_unrecheable for the places currently not handled in testcases

@github-actions
Copy link

github-actions bot commented Mar 12, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@bcardosolopes
Copy link
Member

Will merge if all tests pass!

@bcardosolopes
Copy link
Member

format is bad, please make sure you run the formatter locally before updating the PR

@Sharp-Edged
Copy link
Contributor Author

Ok, should be all fixed now... @bcardosolopes

@bcardosolopes
Copy link
Member

Ok, let's see if tests pass now!

@Sharp-Edged
Copy link
Contributor Author

@bcardosolopes can this be merged? I'll need this for my next PR.

@Sharp-Edged Sharp-Edged requested a review from keryell March 15, 2025 19:07
Copy link
Collaborator

@keryell keryell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@bcardosolopes
Copy link
Member

Testing again! (Once you land your first PR tests will run automatically, but right now I need to click every time it gets updated)

@keryell
Copy link
Collaborator

keryell commented Mar 18, 2025

I guess there is now some rebase to be done.

@Sharp-Edged
Copy link
Contributor Author

Ok I think I fixed everything... @bcardosolopes / @keryell can you run the tests again?

@bcardosolopes
Copy link
Member

Tests running!

@Sharp-Edged
Copy link
Contributor Author

I have no clue what this failing test on Mac is, I haven't changed anything relating to try-catch...

@keryell
Copy link
Collaborator

keryell commented Mar 20, 2025

I have no clue what this failing test on Mac is, I haven't changed anything relating to try-catch...

This is not your fault.
It is a current bug https://github.com/llvm/clangir/actions/runs/13937438507/job/39018156537 after the up-stream rebase. Just wait for main to be fixed and rebase after this.

@bcardosolopes bcardosolopes merged commit fffcd5a into llvm:main Mar 20, 2025
8 of 9 checks passed
@Sharp-Edged Sharp-Edged deleted the shadow-vars branch March 20, 2025 20:11
el-ev pushed a commit to el-ev/clangir that referenced this pull request Mar 21, 2025
…R attribute. (llvm#1467) Started decorating CUDA shadow variables with the shadow_name CIR attribute which will be used for registering the globals.
el-ev pushed a commit to el-ev/clangir that referenced this pull request Mar 21, 2025
…R attribute. (llvm#1467) Started decorating CUDA shadow variables with the shadow_name CIR attribute which will be used for registering the globals.
el-ev pushed a commit to el-ev/clangir that referenced this pull request Mar 24, 2025
…R attribute. (llvm#1467) Started decorating CUDA shadow variables with the shadow_name CIR attribute which will be used for registering the globals.
el-ev pushed a commit to el-ev/clangir that referenced this pull request Mar 24, 2025
…R attribute. (llvm#1467) Started decorating CUDA shadow variables with the shadow_name CIR attribute which will be used for registering the globals.
terapines-osc-cir pushed a commit to Terapines/clangir that referenced this pull request Sep 2, 2025
…R attribute. (llvm#1467) Started decorating CUDA shadow variables with the shadow_name CIR attribute which will be used for registering the globals.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants