-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
[openvdb] Fix CUDA headers installation path #41102
base: master
Are you sure you want to change the base?
Conversation
@microsoft-github-policy-service agree |
Please commit |
Changing installation layout may break downstream usage. IIUC upstream's direction is to change the |
Downstream usage doesn't exist/is broken because files were including Cuda* headers inside
Yes, they moved CUDA files to |
05cd78c
to
5d39108
Compare
Why? nanovdb is a feature of openvdb. The port is openvdb and is already there 🤔 |
5d39108
to
084901d
Compare
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.
Downstream usage doesn't exist/is broken because files were including Cuda* headers inside
util/cuda
that weren't installed. Now it's fixed
There were installed to a different location. I am unable to tell if downstream usage might rely on this location directly.
IIUC upstream's direction is to change the #include statements, not the installation layout
Yes, they moved CUDA files to
cuda/
andtools/cuda/
, but that will be another version, doesn't it? For the current the installation requires CUDA files to be atutil/cuda/
(as they are in the original source code)
Why should the headers be moved to a subdir only to move them back in the next release?
Too many #include
to fix?
@@ -169,17 +169,6 @@ set(NANOVDB_INCLUDE_UTILFILES | ||
util/CpuTimer.h | ||
util/CreateNanoGrid.h | ||
util/CSampleFromVoxels.h | ||
- util/cuda/CudaAddBlindData.cuh | ||
- util/cuda/CudaDeviceBuffer.h | ||
- util/cuda/CudaGridChecksum.cuh | ||
- util/cuda/CudaGridHandle.cuh | ||
- util/cuda/CudaGridStats.cuh | ||
- util/cuda/CudaIndexToGrid.cuh | ||
- util/cuda/CudaNodeManager.cuh | ||
- util/cuda/CudaPointsToGrid.cuh | ||
- util/cuda/CudaSignedFloodFill.cuh | ||
- util/cuda/CudaUtils.h | ||
- util/cuda/GpuTimer.h |
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.
This added the headers to NANOVDB_INCLUDE_UTILFILES
.
+set(NANOVDB_INSTALL_UTILCUDADIR ${NANOVDB_INSTALL_UTILDIR}/cuda) | ||
|
||
install(FILES ${NANOVDB_INCLUDE_FILES} DESTINATION ${NANOVDB_INSTALL_INCLUDEDIR}) | ||
install(FILES ${NANOVDB_INCLUDE_UTILFILES} DESTINATION ${NANOVDB_INSTALL_UTILDIR}) |
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.
This installs NANOVDB_INCLUDE_UTILFILES
.
What was meant is:
|
084901d
to
45b4903
Compare
I am unable to tell too. What I can say is that it's not the standard way of using nanovdb: if you look at the get started example or the examples you can see they use the
They didn't really moved them back, they changed the code structure: some headers went to |
Have you reported this issue and/or submitted this change upstream? |
As far as I'm seeing it's fixed in the current OpenVDB upstream (also, the include directories structure has changed): |
If this bug is fixed in upstreams master than we should either download the patch from upstream or wait until their next release. It looks like their last release was in November last year and they seem to mint releases at least once a year. Maybe it's worth reaching out and seeing if they are willing to make another release? |
As the working patch for v11.0.0 is here and ready, I would currently merge this PR and think about the next version later; without waiting for it to come out. I can provide the port for the next version myself but I don't see to have much time in the near future |
If upstream has already fixed this bug, please download and apply the patch directly rather than checking it in. |
This is the commit history of the file of interest: 77f28d1 is the commit where the file is at, at our current version (that is The last two commits fix the bug, but at the same time depend on the new project structure (that e.g. adds the tools/ folder). It's not trivial for me to extract the changes. So, as you stated in one of your messages (@JavierMatosD), we can try to wait for November to see if they will deploy another release, and make the port for it. For @danrbailey (openvdb dev): do you have any plan to release soon-ish? |
The scope of this PR is to fix nanovdb compiled with CUDA.
The issue is that the following lines of code are evaluated when compiling with nvcc:
https://github.com/AcademySoftwareFoundation/openvdb/blob/6c044e628a1ac3546eed48b6f5e9c76dfaa2143e/nanovdb/nanovdb/util/GridHandle.h#L492
But the
util/cuda/
directory wasn't correctly installed (all files went under theutil
directory).Therefore the compiler was unable to find
util/cuda/
files.The issue is a openvdb
v11.0.0
issue (latest stable version?), I'm not sure if persists in the upstream. See:https://github.com/AcademySoftwareFoundation/openvdb/blob/6c044e628a1ac3546eed48b6f5e9c76dfaa2143e/nanovdb/nanovdb/CMakeLists.txt#L273
"port-version"
is reset (removed fromvcpkg.json
)../vcpkg x-add-version --all
and committing the result.