Skip to content

Commit 28a784f

Browse files
committed
Replace gemm in math_kernel
1 parent 7b94610 commit 28a784f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

source/module_base/module_device/types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ enum AbacusDevice_t
1212
UnKnown,
1313
CpuDevice,
1414
GpuDevice,
15+
DspDevice
1516
};
1617

1718
} // namespace base_device

source/module_hsolver/kernels/math_kernel_op.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,11 @@ struct gemm_op<T, base_device::DEVICE_CPU>
277277
T* c,
278278
const int& ldc)
279279
{
280+
#ifdef __DSP
281+
BlasConnector::gemm(transb, transa, n, m, k, *alpha, b, ldb, a, lda, *beta, c, ldc, base_device::AbacusDevice_t::DspDevice);
282+
#else
280283
BlasConnector::gemm(transb, transa, n, m, k, *alpha, b, ldb, a, lda, *beta, c, ldc);
284+
#endif
281285
}
282286
};
283287

0 commit comments

Comments
 (0)