Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion mmcv/ops/fused_bias_leakyrelu.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ def fused_bias_leakyrelu(input: torch.Tensor,
torch.Tensor: Feature map after non-linear activation.
"""

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

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