Closed cslxiao closed 4 years ago
I encounter this error when executing
python setup.py build develop
det3d/ops/sigmoid_focal_loss/src/sigmoid_focal_loss_cuda.cu(121): error: no suitable constructor exists to convert from "c10::ScalarType" to "at::Type"
Please check the version of cuda cudnn and gcc. I use gcc 5.4.0.
you need to use gpu to compile. or it will raise error when executing. Please follow instructions.
I use cuda 10, cudnn 7.5 and gcc 7.4. I strictly followed the instructions but still got the error
I use cuda 10, cudnn 7.5 and gcc 7.4. I strictly followed the instructions but still got the error
Please use gcc 5.4.0 and try again
If you are using pytorch 1.0, you will face this error(same as me). there is some api changed between torch 1.0 and 1.3 check this part in the sigmoid_focal_loss_cuda.cu file
/** pytorch 1.1+ **/
// AT_DISPATCH_FLOATING_TYPES_AND_HALF(
// logits.scalar_type(), "SigmoidFocalLoss_forward", [&] {
// SigmoidFocalLossForward<scalar_t><<<grid, block>>>(
// losses_size, logits.contiguous().data<scalar_t>(),
// targets.contiguous().data<int64_t>(), num_classes, gamma, alpha,
// num_samples, losses.data<scalar_t>());
// });
/** pytorch 1.0 **/
AT_DISPATCH_FLOATING_TYPES_AND_HALF(
logits.type(), "SigmoidFocalLoss_forward", [&] {
SigmoidFocalLossForward<scalar_t><<<grid, block>>>(
losses_size, logits.contiguous().data<scalar_t>(),
targets.contiguous().data<int64_t>(), num_classes, gamma, alpha,
num_samples, losses.data<scalar_t>());
});
@muzi2045 Thanks. Updating torch solves this problem.
I encounter this error when executing
det3d/ops/sigmoid_focal_loss/src/sigmoid_focal_loss_cuda.cu(121): error: no suitable constructor exists to convert from "c10::ScalarType" to "at::Type"