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

unset torch arch list for JIT mode #1765

Merged
merged 3 commits into from
Feb 11, 2022
Merged

unset torch arch list for JIT mode #1765

merged 3 commits into from
Feb 11, 2022

Conversation

jeffra
Copy link
Collaborator

@jeffra jeffra commented Feb 11, 2022

PyTorch will add -gencode args for whatever CCs are in the TORCH_CUDA_ARCH_LIST at compile time, this makes sense when pre-compiling but does not make sense in JIT compile mode since we know at runtime what the targets need to be. Our op-builder has already set the intended targets that are needed at runtime. We need to unset the arch list before JIT compiling to avoid CC collisions such as multiple __half implementations. This PR simply stashes the arch list before JIT compiling and resets it after build.

@jeffra jeffra merged commit 674c758 into master Feb 11, 2022
@jeffra jeffra deleted the fix-gencode-issue branch February 11, 2022 21:42
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.

2 participants