-
Notifications
You must be signed in to change notification settings - Fork 267
Fixes MX formats build for blackwell #2214
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
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/2214
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit f423915 with merge base 554cb60 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This meeans we end up shipping 3 more .so s right? I wonder if ther isn't a better way to do this by including the files in the extension module but allowing per source flags |
I agree with that but it seems like currently there isn't a way to specify per source flags using torch cpp_extensions. There is some machinery in cmake: https://github.com/pytorch/pytorch/blob/2362bd4a4c9bb909eb8265d3ca9854b5ec07867e/cmake/Codegen.cmake#L93-L126 and it would be nice if we could do something similar in |
@syed-ahmed I got frustrated w/ cpp extensions and started working on: #1659 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To unblock, lets merge it but can you open an Issue stating that we currently need an SO per cuda-arch and we should either fix this in cpp_extensions are migrate to a pure cmake build in order to resolve this
Sounds good! Thanks. |
When
TORCH_CUDA_ARCH_LIST
doesn't have9.0a
,setup.py
first compiles the files insources
and then compiles the files incutlass_90a_sources
, overwriting the_C.abi3.so
that was produced before:As a result of the overwrite, we get NotImplementedError for CUDA backend for the MXFP4_CUTLASS tests. In this PR, we are proposing to have a separate
_C_cutlass_90a
, so that we don't overwrite_C.abi3.so
. It also preserves the old behavior that only files that need 90a are compiled with 90a.Similarly, the same is done for files that need to be compiled with 100a. Currently, if we don't compile
mx_fp_cutlass_kernels
with 100a, we see aCutlass cannot run
error on a SM 100 machine.CC: @drisspg @vkuzo @msaroufim