Skip to content

Commit

Permalink
Merge pull request #8 from wujiadi1/rc4main
Browse files Browse the repository at this point in the history
fix the bug of fused_bias_leakyrelu
  • Loading branch information
momo609 committed May 29, 2024
2 parents e7c2439 + 18a865b commit 8c7092b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mmcv/ops/fused_bias_leakyrelu.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def fused_bias_leakyrelu(input: torch.Tensor,
torch.Tensor: Feature map after non-linear activation.
"""

if not input.is_cuda:
if not input.is_cuda and input.device.type != 'npu':
return bias_leakyrelu_ref(input, bias, negative_slope, scale)

return FusedBiasLeakyReLUFunction.apply(input, bias.to(input.dtype),
Expand Down

0 comments on commit 8c7092b

Please sign in to comment.