Commit 85d77474 authored by yan.yan's avatar yan.yan
Browse files

fix thrust problem

parent 647927ce
# Changelog # Changelog
## [2.1.22] - 2022-6-11
### Fixed
- Fix thrust problem by adding -fvisibility=hidden
## [2.1.21] - 2021-12-9 ## [2.1.21] - 2021-12-9
### Added ### Added
......
...@@ -31,7 +31,7 @@ class CustomThrustLib(pccm.Class): ...@@ -31,7 +31,7 @@ class CustomThrustLib(pccm.Class):
self.add_dependency(ThrustLib) self.add_dependency(ThrustLib)
# https://github.com/NVIDIA/thrust/issues/1401#issuecomment-806403746 # https://github.com/NVIDIA/thrust/issues/1401#issuecomment-806403746
if compat.InLinux: if compat.InLinux:
self.build_meta.add_cflags("nvcc", "-Xcompiler", "-fno-gnu-unique") self.build_meta.add_cflags("nvcc", "-Xcompiler", "-fvisibility=hidden")
class ThrustCustomAllocatorV2(pccm.Class, pccm.pybind.PybindClassMixin): class ThrustCustomAllocatorV2(pccm.Class, pccm.pybind.PybindClassMixin):
...@@ -566,7 +566,7 @@ class SpconvOps(pccm.Class): ...@@ -566,7 +566,7 @@ class SpconvOps(pccm.Class):
}} }}
""" """
code.add_dependency(ThrustLib, TensorViewKernel) code.add_dependency(CustomThrustLib, TensorViewKernel)
code.add_param_class("cudakers", CudaCommonKernel()) code.add_param_class("cudakers", CudaCommonKernel())
code.raw(f""" code.raw(f"""
cudaStream_t stream_cu = reinterpret_cast<cudaStream_t>(stream); cudaStream_t stream_cu = reinterpret_cast<cudaStream_t>(stream);
...@@ -614,7 +614,7 @@ class SpconvOps(pccm.Class): ...@@ -614,7 +614,7 @@ class SpconvOps(pccm.Class):
}} }}
}} }}
""" """
code.add_dependency(ThrustLib, TensorViewKernel) code.add_dependency(CustomThrustLib, TensorViewKernel)
code.add_param_class("cudakers", CudaCommonKernel()) code.add_param_class("cudakers", CudaCommonKernel())
code.raw(f""" code.raw(f"""
ThrustCustomAllocatorV2 allocator{{alloc_func}}; ThrustCustomAllocatorV2 allocator{{alloc_func}};
......
2.1.21 2.1.22
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment