masahi commented on code in PR #15435:
URL: https://github.com/apache/tvm/pull/15435#discussion_r1278192503
##########
src/runtime/contrib/cublas/cublas.cc:
##########
@@ -239,8 +239,12 @@ void CallCublasLt(cublasLtHandle_t hdl, const DLTensor* A,
const DLTensor* B, co
auto B_data = static_cast<char*>(B->data) + B->byte_offset;
auto C_data = static_cast<char*>(C->data) + C->byte_offset;
+ auto func = tvm::runtime::Registry::Get("runtime.get_cuda_stream");
+ ICHECK(func != nullptr);
+ cudaStream_t stream = static_cast<cudaStream_t>((*func)().operator void*());
Review Comment:
It's better to get the stream at
https://github.com/apache/tvm/blob/unity/src/runtime/contrib/cublas/cublas_json_runtime.cc#L54
once rather than repeatedly here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]