CircleRadon / APro

The code for "Label-efficient Segmentation via Affinity Propagation". [NeurIPS2023]
Apache License 2.0
61 stars 1 forks source link

which version of pytorch? #4

Closed lauraset closed 7 months ago

lauraset commented 7 months ago

Hello, @CircleRadon. When I compiled the gp_process, it fails and shows that: The environment used is pytorch 1.10.1+cuda11.3 in windows platform.

D:\code\SAM\APro\apro\gp_cuda\gp_process\gp_process.cu(14): note #2689-D: the value of parameter "edge_num"
(13): here cannot be used as a constant

D:\code\SAM\APro\apro\gp_cuda\gp_process\gp_process.cu(21): error: more than one conversion function from "lambda [](Edge &, Edge &)->__nv_bool" to "<error-type>" applies:      
            function "lambda [](Edge &, Edge &)->__nv_bool::operator __nv_bool (*)(Edge &, Edge &)() const" (declared implicitly)
            function "lambda [](Edge &, Edge &)->__nv_bool::operator __nv_bool (*)(Edge &, Edge &)() const" (declared implicitly)

D:\code\SAM\APro\apro\gp_cuda\gp_process\gp_process.cu(69): error: expression must have a constant value
D:\code\SAM\APro\apro\gp_cuda\gp_process\gp_process.cu(69): note #2689-D: the value of variable "batch_size"
(62): here cannot be used as a constant

5 errors detected in the compilation of "D:/code/SAM/APro/apro/gp_cuda/gp_process/gp_process.cu".
error: command 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.6\\bin\\nvcc.exe' failed with exit code 1

Do you have any ideas? Thank you in advance.

CircleRadon commented 7 months ago

Hi, @lauraset The version of pytorch we used is 1.9.0, but I don't think the error is related to the pytorch version. We have not tested it on Windows platform, which may not be very compatible. I recommand running on ubuntu platform.

lauraset commented 7 months ago

Hi, @CircleRadon. Thank you very much. I will try the ubuntu platform.