Open luodi789567890 opened 1 year ago
replace headers in pair_wise_distance_cuda_source.py
by following could fix the problem:
#include <stdio.h>
#include <math.h>
#include <cuda.h>
#include <cuda_runtime.h>
#define CUDA_NUM_THREADS 256
#include <torch/extension.h>
#include <torch/types.h>
#include <ATen/core/TensorAccessor.h>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/cuda/Atomic.cuh>
#include <ATen/cuda/DeviceUtils.cuh>
// #include <THC/THC.h>
// #include <THC/THCAtomics.cuh>
// #include <THC/THCDeviceUtils.cuh>
Traceback (most recent call last):
File "train.py", line 51, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "train.py", line 53, in
include <ATen/cuda/Atomic.cuh>
include <ATen/cuda/DeviceUtils.cuh>
有用!!!!
/cuda.cu -o cuda.cuda.o /public/home/wzq_majiaojiao/.cache/torch_extensions/py38_cu118/pair_wise_distance/cuda.cu:17:10: fatal error: THC/THC.h: No such file or directory 17 | #include <THC/THC.h> | ^
~~compilation terminated. ninja: build stopped: subcommand failed.During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "train.py", line 53, in
raise ValueError('not supported model type! or something')
ValueError: not supported model type! or something