Skip to content

Commit a4a688d

Browse files
author
haixuanTao
committed
adding CUDA Session Executor option for Linux
1 parent 88c6bab commit a4a688d

File tree

4 files changed

+1666
-11093
lines changed

4 files changed

+1666
-11093
lines changed

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,16 @@ environment variable `ORT_USE_CUDA=1` (only supports Linux or Windows).
6363
Until the build script allow compilation of the runtime, see the [compilation notes](ONNX_Compilation_Notes.md)
6464
for some details on the process.
6565

66+
### Note on using CUDA
67+
68+
To use CUDA you will need to set `ORT_USE_CUDA=1` but also to set your session with the method `use_cuda` as such:
69+
70+
```
71+
let mut session = environment
72+
.new_session_builder()?
73+
.use_cuda(0)?
74+
```
75+
6676
### Note on 'ORT_STRATEGY=system'
6777

6878
When using `ORT_STRATEGY=system`, executing a built crate binary (for example the tests) might fail, at least on macOS,

0 commit comments

Comments
 (0)