Skip to content

Fix version macro and PyTorch 2.10 build error#423

Merged
matthewdcong merged 11 commits into
openvdb:mainfrom
matthewdcong:pytorch_310
Jan 26, 2026
Merged

Fix version macro and PyTorch 2.10 build error#423
matthewdcong merged 11 commits into
openvdb:mainfrom
matthewdcong:pytorch_310

Conversation

@matthewdcong

@matthewdcong matthewdcong commented Jan 22, 2026

Copy link
Copy Markdown
Contributor

The return value of allowFP16ReductionCuBLAS has been changed to an enum in PyTorch 2.10. Unfortunately, the return value of the enum when reinterpreted as a boolean/integer has also been changed so we need to #ifdef it using a version macro. Prior to PyTorch 2.10, allowing reduced precision returned true but now allowing reduced precision returns the enum value AllowReducedPrecisionWithSplitK which equals 0.

Furthermore, the other places in fVDB where we were relying on PyTorch version macros were not correctly including the header that defines the macros. While this still yields correct behavior for most recent PyTorch versions (>= 2.7), this should still be fixed up. This also silences two warnings that are showing up in the Conda CI as a result of these includes. These are likely due to GCC bugs and incorrect based on silencing of a similar error (and prior experience with NanoVDB).

Finally, certain cuBLAS calls in the PyTests fail with PyTorch 2.1.0 and the cuda:13.0.1 image. Upgrading to cuda:13.0.2 fixes the issues. We haven't been able to reproduce these errors outside of Docker or in other Docker containers so it's unlikely worth additional investigation at least for now.

@harrism

harrism commented Jan 22, 2026

Copy link
Copy Markdown
Contributor

Thanks @matthewdcong !

@matthewdcong matthewdcong force-pushed the pytorch_310 branch 4 times, most recently from 6bec33d to 71b914a Compare January 22, 2026 05:50
matthewdcong added a commit that referenced this pull request Jan 22, 2026
PyTorch 2.10 was released today which introduces an API change which
breaks compilation. Even with the relevant fixes, it still leads to a
`CUBLAS_STATUS_INVALID_VALUE` mismatch on the unit tests. Pin the
PyTorch version to 2.9.1 to workaround these issues for now.

For more information, refer to #423 and
pytorch/pytorch#170676

Signed-off-by: Matthew Cong <mcong@nvidia.com>
This reverts commit 8038f76.

Signed-off-by: Matthew Cong <mcong@nvidia.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
@matthewdcong

matthewdcong commented Jan 26, 2026

Copy link
Copy Markdown
Contributor Author

Due to the changes in the CI configuration, I needed to run the tests from a different PR with pull_request instead of pull_request_target in the fvdb-core repository. Those tests have passed, (see CUDA 13.0.2 jobs in #425 ) so this can be merged.

@matthewdcong matthewdcong merged commit 36afcc1 into openvdb:main Jan 26, 2026
31 of 32 checks passed
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