Skip to content

[AMDGPU] Accept/Ignore any -mcmodel arguments. #70760

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

Merged
merged 2 commits into from
Oct 31, 2023

Conversation

pravinjagtap
Copy link
Contributor

No description provided.

@llvmbot llvmbot added clang Clang issues not falling into any other category clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' labels Oct 31, 2023
@github-actions
Copy link

github-actions bot commented Oct 31, 2023

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

@pravinjagtap pravinjagtap merged commit ab1c97b into llvm:main Oct 31, 2023
Copy link
Contributor

@arsenm arsenm left a comment

Choose a reason for hiding this comment

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

Needs test

// for the host.
} else if (Triple.isNVPTX() || Triple.isAMDGPU()) {
// NVPTX/AMDGPU does not care about the code model and will accept
// whatever works for the host.
Ok = true;
}
if (Ok) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

neither nvptx or amdgpu backend accepts -mcmodel=tiny and kernel. the backends will fail with error:

fatal error: error in backend: Target does not support the tiny CodeModel

for tiny and kernel, we should not pass them to clang -cc1 and emit a warning that they are ignored.

pravinjagtap added a commit to pravinjagtap/llvm-project that referenced this pull request Nov 29, 2023
MaskRay added a commit that referenced this pull request Jan 24, 2024
Fix missing test coverage after #70740 #70760

When compiling for CUDA/HIP, the driver creates a cc1 job to compile for
amdgcn/nvptx triple using most options.
Certain target-specific options should be ignored, not lead to an error
(`err_drv_unsupported_opt_for_target`).
@pravinjagtap pravinjagtap deleted the handle-mcmode-amdgpu branch March 1, 2024 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants