Skip to content

ARM & PYTORCH 2.6 &CUDA 12.8 #873

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

Closed
wants to merge 0 commits into from

Conversation

johnnynunez
Copy link
Contributor

This pull request includes updates to CUDA dispatch macros and improvements to the setup.py script for the Kaolin library. The most important changes include updating the dispatch macros to use scalar_type() and enhancing the setup.py script for better version handling and logging.

CUDA dispatch macro updates:

  • Updated AT_DISPATCH_FLOATING_TYPES_AND_HALF macros to use scalar_type() instead of type() in kaolin/csrc/ops/spc/point_utils_cuda.cu (interpolate_trilinear_cuda_impl, coords_to_trilinear_cuda_impl) [1] [2].
  • Updated AT_DISPATCH_FLOATING_TYPES_AND_HALF macros to use scalar_type() instead of type() in kaolin/csrc/ops/spc/query_cuda.cu (query_cuda_impl, query_multiscale_cuda_impl, query_cuda_impl_empty) [1] [2] [3].
  • Updated AT_DISPATCH_FLOATING_TYPES_AND_HALF and AT_DISPATCH_INTEGRAL_TYPES macros to use scalar_type() in kaolin/csrc/render/spc/raytrace_cuda.cu (mark_pack_boundaries_cuda_impl, diff_cuda_impl, sum_reduce_cuda_impl, cumsum_cuda_impl, cumprod_cuda_impl) [1] [2] [3] [4] [5] [6] [7].

Setup script improvements:

  • Enhanced setup.py to better handle version constraints and logging for PyTorch and Cython dependencies [1] [2].
  • Improved the handling of CUDA architectures and cross-compilation settings in setup.py [1] [2].

@johnnynunez
Copy link
Contributor Author

It is working fine on jetson agx orin cuda 12.8 pytorch 2.6.0

https://github.com/dusty-nv/jetson-containers/tree/master/packages/pytorch/torch3d

Copy link
Collaborator

@Caenorst Caenorst left a comment

Choose a reason for hiding this comment

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

Thank you so much for the PR. I'm gonna add few commits on top just to fix the doc issue and the comments that git removed.

Is there a specific reason to remove the no_python_abi_suffix option? Also the title claim this is for 12.8. How are most of you using 12.8? nvcr or nightly build? It will be difficult for us to have wheels before pytorch make a release. We will try to see how we can ship wheels for ARM but for now it's great to enable at least build from source.

setup.py Outdated
CYTHON_MIN_VER = '0.29.37'
IGNORE_TORCH_VER = os.getenv('IGNORE_TORCH_VER') is not None

# Module required before installation
# trying to install it ahead turned out to be too unstable.
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you keep this comment?

setup.py Outdated
extra_compile_args = {'cxx': ['-O3']}
define_macros = []
include_dirs = []
sources = glob.glob('kaolin/csrc/**/*.cpp', recursive=True)
# FORCE_CUDA is for cross-compilation in docker build
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you keep this comment?

setup.py Outdated
packages=find_packages(exclude=('docs', 'tests', 'examples')),
scripts=get_scripts(),
include_package_data=True,
install_requires=get_requirements(),
zip_safe=False,
ext_modules=get_extensions(),
cmdclass={
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please keep the options, is there a specific reason to remove it?

@johnnynunez
Copy link
Contributor Author

Thank you so much for the PR. I'm gonna add few commits on top just to fix the doc issue and the comments that git removed.

Is there a specific reason to remove the no_python_abi_suffix option? Also the title claim this is for 12.8. How are most of you using 12.8? nvcr or nightly build? It will be difficult for us to have wheels before pytorch make a release. We will try to see how we can ship wheels for ARM but for now it's great to enable at least build from source.

We build our pytorch in jetson-containers (Nvidia) with the official branch.

@Caenorst
Copy link
Collaborator

I pushed my master by mistake and cause it to close the PR, now I can't push anything on you branch anymore 😂 I pushed my modifications on top of your work here: https://github.com/Caenorst/kaolin/tree/arm do you mind reopen the PR with this?

@johnnynunez
Copy link
Contributor Author

johnnynunez commented Mar 25, 2025

I pushed my master by mistake and cause it to close the PR, now I can't push anything on you branch anymore 😂 I pushed my modifications on top of your work here: https://github.com/Caenorst/kaolin/tree/arm do you mind reopen the PR with this?

Ah it’s because seems that in my branch are not the cahnges anymore. You can continue if you want.
i’m coming back to BCN from GTC25

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