Commit 5c373f70 authored by hubertlu-tw's avatar hubertlu-tw Committed by flyingdown
Browse files

Fix a bug in fused_dense_cuda on ROCm

parent 2951440a
......@@ -62,7 +62,7 @@ std::vector<at::Tensor> linear_bias_backward(at::Tensor input, at::Tensor weight
// create output/workspace tensor
auto d_weight = at::empty({out_features, in_features}, input.type());
#if defined(CUBLAS_VERSION) && CUBLAS_VERSION < 11600
#if (defined(CUBLAS_VERSION) && CUBLAS_VERSION < 11600) || __HIP_PLATFORM_HCC__
auto d_bias = d_output.view({-1, out_features}).sum(0, false);
#else
auto d_bias = at::empty({out_features}, input.type());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment