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

Add CUDA compute capability compile guard #636

Merged
merged 2 commits into from
Aug 8, 2024

Conversation

gau-nernst
Copy link
Collaborator

Fixes #632

Tested on Google Colab

image

Copy link

pytorch-bot bot commented Aug 8, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/636

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 2f0aef4 with merge base e11201a (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 8, 2024
@@ -14,6 +14,8 @@
//
// This file is adapted from https://github.com/usyd-fsalab/fp6_llm/blob/5df6737cca32f604e957e3f63f03ccc2e4d1df0d/fp6_llm/csrc/fp6_linear.cu

#if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 800 // at least Ampere
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For anyone wondering why this instead of defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 800, I'm following this.

One reason I can think of is for vscode intellisense to work. If I use #if defined(__CUDA_ARCH__), vscode will not do syntax highlighting. There are workarounds, like this, but it is more cumbersome.

@msaroufim msaroufim merged commit 32f421b into pytorch:main Aug 8, 2024
14 checks passed
@gau-nernst gau-nernst deleted the compile_guard branch August 9, 2024 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make build from source easier on unsupported hardware
3 participants