Skip to content

Commit

Permalink
Disable CUDA provider options.
Browse files Browse the repository at this point in the history
  • Loading branch information
hgaiser committed Nov 23, 2023
1 parent 16c7d90 commit 094b04e
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions rust/onnxruntime/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,14 @@ impl<'a> SessionBuilder<'a> {
/// Append a CUDA execution provider
pub fn with_execution_provider_cuda(self) -> Result<SessionBuilder<'a>> {
let mut cuda_options: *mut sys::OrtCUDAProviderOptionsV2 = null_mut();
let status = unsafe {
self.env
.env()
.api()
.CreateCUDAProviderOptions
.unwrap()(&mut cuda_options)
};
status_to_result(status).map_err(OrtError::CudaProviderOptions)?;
// let status = unsafe {
// self.env
// .env()
// .api()
// .CreateCUDAProviderOptions
// .unwrap()(&mut cuda_options)
// };
// status_to_result(status).map_err(OrtError::CudaProviderOptions)?;

let status = unsafe {
self.env
Expand All @@ -182,13 +182,13 @@ impl<'a> SessionBuilder<'a> {
};
status_to_result(status).map_err(OrtError::AppendExecutionProviderCuda)?;

unsafe {
self.env
.env()
.api()
.ReleaseCUDAProviderOptions
.unwrap()(cuda_options);
};
// unsafe {
// self.env
// .env()
// .api()
// .ReleaseCUDAProviderOptions
// .unwrap()(cuda_options);
// };
Ok(self)
}

Expand Down

0 comments on commit 094b04e

Please sign in to comment.