NVlabs / nvblox_torch

nvblox Torch
Other
23 stars 4 forks source link

nvblox::image::copy<float>(4, 4, (float*) transform_t_T.data_ptr() is not supported? #3

Closed Hermanye996 closed 5 months ago

Hermanye996 commented 7 months ago

Hello, Error occured when sh install_isaac_sim.sh $($isaacrepo/python.sh -c 'import torch.utils; print(torch.utils.cmake_prefix_path)'), it seems that nvblox::image::copy<float>(4, 4, (float*) transform_t_T.data_ptr() is not supported?

/home/hermanye20/.local/share/ov/pkg/isaac_sim-2023.1.0-hotfix.1/extscache/omni.pip.torch-2_0_1-2.0.2+105.1.lx64/torch-2-0-1/torch/include/ATen/ops/copy_native.h:25:22: note:   ‘at::native::copy’
   25 | TORCH_API at::Tensor copy(const at::Tensor & self, const at::Tensor & src, bool non_blocking=false);
      |                      ^~~~
/home/hermanye20/curobo_ws/nvblox_torch/nvblox_torch/cpp/src/convert_tensors.cpp:118:25: error: expected primary-expression before ‘float’
  118 |     nvblox::image::copy<float>(4, 4, (float*) transform_t_T.data_ptr(), transform.matrix().data());
      |                         ^~~~~
3 errors detected in the compilation of "/home/hermanye20/curobo_ws/nvblox_torch/nvblox_torch/cpp/src/py_mapper.cu".
make[2]: *** [CMakeFiles/py_nvblox.dir/build.make:92: CMakeFiles/py_nvblox.dir/src/py_mapper.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/py_nvblox.dir/build.make:120: CMakeFiles/py_nvblox.dir/src/convert_tensors.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:111: CMakeFiles/py_nvblox.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
hermanye20@hermanye20:~$ $isaacrepo/python.sh test_cuda.py 
Isaac Sim Version: 2023.1.0-hotfix
Torch Version: 2.0.1+cu118
Torchvision Version: 0.15.2+cu118
CUDA with torch available: True
CUDA version: 11.8
cuDNN Version: 8700
Current CUDA device: 0
Number of CUDA devices: 1
Name of current CUDA device: NVIDIA GeForce RTX 4070 Ti

TESTING CUDA WITH PYTORCH
========================
Random matrix on CPU:
tensor([[0.9956, 0.6697, 0.6463],
        [0.4626, 0.7905, 0.2208],
        [0.8766, 0.4024, 0.6725],
        [0.8731, 0.5142, 0.6054],
        [0.1835, 0.7378, 0.9476]])

Random matrix on CUDA (GPU):
tensor([[0.9956, 0.6697, 0.6463],
        [0.4626, 0.7905, 0.2208],
        [0.8766, 0.4024, 0.6725],
        [0.8731, 0.5142, 0.6054],
        [0.1835, 0.7378, 0.9476]], device='cuda:0')

Tensor operations:
Tensor a = tensor([0., 0.], device='cuda:0')
Tensor b = tensor([ 1.9462, -0.5544], device='cuda:0')
Tensor c = tensor([ 1.9462, -0.5544], device='cuda:0')
balakumar-s commented 7 months ago

Can you try with the new release?