Skip to content
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

Fix GPUXToSpirv Pass to iterate for all gpuModules #426

Merged
merged 1 commit into from
Oct 31, 2022

Conversation

nbpatel
Copy link
Contributor

@nbpatel nbpatel commented Oct 30, 2022

Please review these guidelines to help with the review process:

  • Have you provided a meaningful PR description?
  • Have you added a test, a reproducer, or a reference to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • If this PR is a work in progress, are you filing the PR as a draft?
  • Have you organized your commits logically and ensured each can be built by itself?

@nbpatel nbpatel requested review from drprajap and silee2 October 30, 2022 21:22
mlir::spirv::MemorySpaceToStorageClassMap memorySpaceMap =
mlir::spirv::mapMemorySpaceToVulkanStorageClass;
mlir::spirv::MemorySpaceToStorageClassConverter converter(memorySpaceMap);
for (auto gpuModule : gpuModules) {
Copy link
Contributor

Choose a reason for hiding this comment

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

so this means upstream is not supporting iterating over all gpu modules?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

upstream does it as well ..here https://mlir.llvm.org/doxygen/GPUToSPIRVPass_8cpp_source.html ..line 68

Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed that (Upstream iterating over gpu module) as well. Did not add the change to #415 since that would make the PR even bigger.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I see it now, when I added this pass, upstream did not have this covered. Looks good.

Copy link
Contributor

@Hardcode84 Hardcode84 Oct 31, 2022

Choose a reason for hiding this comment

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

I did this change both in main and in upstream some time ago, to support attaching different TargetEnv's to different gpu modules https://reviews.llvm.org/D135907

Copy link
Contributor

@silee2 silee2 left a comment

Choose a reason for hiding this comment

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

LGTM

@nbpatel nbpatel merged commit 97a8e33 into refactor Oct 31, 2022
@nbpatel nbpatel deleted the nishanr_gpuxtospirv branch November 1, 2022 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants