Skip to content

Commit 3dff319

Browse files
author
haixuanTao
committed
fixing workflow configuration
1 parent 61f05c5 commit 3dff319

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

.github/workflows/general.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,17 @@ jobs:
7373
# ******************************************************************
7474
- name: Download prebuilt archive (GPU, x86_64-unknown-linux-gnu)
7575
uses: actions-rs/cargo@v1
76-
env:
77-
ORT_USE_CUDA: "yes"
7876
with:
7977
command: build
80-
args: --target x86_64-unknown-linux-gnu
78+
args: --target x86_64-unknown-linux-gnu --features cuda
8179
- name: Verify prebuilt archive downloaded (GPU, x86_64-unknown-linux-gnu)
8280
run: ls -lh target/x86_64-unknown-linux-gnu/debug/build/onnxruntime-sys-*/out/onnxruntime-linux-x64-gpu-1.*.tgz
8381
# ******************************************************************
8482
- name: Download prebuilt archive (GPU, x86_64-pc-windows-msvc)
8583
uses: actions-rs/cargo@v1
86-
env:
87-
ORT_USE_CUDA: "yes"
8884
with:
8985
command: build
90-
args: --target x86_64-pc-windows-msvc
86+
args: --target x86_64-pc-windows-msvc --features cuda
9187
- name: Verify prebuilt archive downloaded (GPU, x86_64-pc-windows-msvc)
9288
run: ls -lh target/x86_64-pc-windows-msvc/debug/build/onnxruntime-sys-*/out/onnxruntime-win-gpu-x64-1.*.zip
9389

@@ -141,8 +137,12 @@ jobs:
141137
uses: actions-rs/cargo@v1
142138
with:
143139
command: build
144-
# Use --manifest-path instead of --package. See https://github.com/actions-rs/cargo/issues/86
145140
args: --manifest-path onnxruntime/Cargo.toml --features model-fetching
141+
- name: Build onnxruntime with 'cuda' feature
142+
uses: actions-rs/cargo@v1
143+
with:
144+
command: build
145+
args: --manifest-path onnxruntime/Cargo.toml --features cuda
146146
- name: Test onnxruntime-sys
147147
uses: actions-rs/cargo@v1
148148
with:

onnxruntime-sys/examples/c_api_sample.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ fn main() {
4949
};
5050

5151
// Optionally add more execution providers via session_options
52-
// E.g. for CUDA include cuda_provider_factory.h and uncomment the following line:
53-
// OrtSessionOptionsAppendExecutionProvider_CUDA(sessionOptions, 0);
5452

5553
//*************************************************************************
5654
// create session and load model into memory

onnxruntime-sys/wrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
#include "cpu_provider_factory.h"
33
#if !defined(__APPLE__)
44
#include "cuda_provider_factory.h"
5-
#endif
5+
#endif

0 commit comments

Comments
 (0)