Skip to content

Commit

Permalink
[TensorRT EP] Add back creation cudnn and cublas using external cuda …
Browse files Browse the repository at this point in the history
…stream (microsoft#17912)

Add back creation cudnn and cublas using external cuda stream.
  • Loading branch information
chilo-ms authored and kleiti committed Mar 22, 2024
1 parent 6749df4 commit 3c0ed99
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,10 @@ TensorrtExecutionProvider::TensorrtExecutionProvider(const TensorrtExecutionProv
if (info.has_user_compute_stream) {
external_stream_ = true;
stream_ = static_cast<cudaStream_t>(info.user_compute_stream);
ORT_IGNORE_RETURN_VALUE(CUBLAS_CALL(cublasCreate(&external_cublas_handle_)));
ORT_IGNORE_RETURN_VALUE(CUBLAS_CALL(cublasSetStream(external_cublas_handle_, stream_)));
ORT_IGNORE_RETURN_VALUE(CUDNN_CALL(cudnnCreate(&external_cudnn_handle_)));
ORT_IGNORE_RETURN_VALUE(CUDNN_CALL(cudnnSetStream(external_cudnn_handle_, stream_)));
}

std::string profile_min_shapes, profile_max_shapes, profile_opt_shapes;
Expand Down

0 comments on commit 3c0ed99

Please sign in to comment.