mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-18 21:21:17 +00:00
Fix a security warning in cuda gemm int8 kernel (#14335)
### Description fix a security warning in GemmInt8 cuda kernel ### Motivation and Context it is for issue: https://dev.azure.com/aiinfra/ONNX%20Runtime/_workitems/edit/11158/ Co-authored-by: Cheng Tang <chenta@microsoft.com@orttrainingdev9.d32nl1ml4oruzj4qz3bqlggovf.px.internal.cloudapp.net>
This commit is contained in:
parent
8236808e89
commit
734ae398ee
1 changed files with 2 additions and 1 deletions
|
|
@ -20,8 +20,9 @@ Status GemmInt8(int m, int n, int k,
|
|||
const CudaKernel* cuda_kernel, onnxruntime::Stream* ort_stream) {
|
||||
ORT_ENFORCE(a != nullptr && b != nullptr && c != nullptr, "input matrix should not be null");
|
||||
ORT_ENFORCE(cuda_kernel != nullptr, "kernel is null");
|
||||
ORT_ENFORCE(ort_stream != nullptr, "Cuda kernel must have the stream instance");
|
||||
|
||||
cudaStream_t stream = ort_stream ? static_cast<cudaStream_t>(ort_stream->GetHandle()) : nullptr;
|
||||
cudaStream_t stream = static_cast<cudaStream_t>(ort_stream->GetHandle());
|
||||
|
||||
// pad A and B to make their leading dimension be multiples of 32
|
||||
// because cublasGemmEx requires:
|
||||
|
|
|
|||
Loading…
Reference in a new issue