Skip to content

Commit

Permalink
Merge pull request #98 from DefTruth/dev
Browse files Browse the repository at this point in the history
try fix and add notes for onnxruntime-linux-gpu support(#97)
  • Loading branch information
DefTruth authored Nov 7, 2021
2 parents 7ff648c + 5b3e97c commit c9adaa6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions lite/ort/core/ort_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@

#ifdef ENABLE_ONNXRUNTIME
#include "onnxruntime/core/session/onnxruntime_cxx_api.h"
/* Need to define USE_CUDA macro manually by users who want to
* enable onnxruntime and lite.ai.toolkit with CUDA support. It
* seems that the latest onnxruntime will no longer pre-defined the
* USE_CUDA macro and just let the decision make by users
* who really know the environments of running device.*/
// #define USE_CUDA
# ifdef USE_CUDA
#include "onnxruntime/core/providers/cuda/cuda_provider_factory.h"
# endif
Expand Down
6 changes: 5 additions & 1 deletion onnxruntime/core/providers/cuda/cuda_provider_factory.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#include "onnxruntime_c_api.h"
// #include "onnxruntime_c_api.h" // official code of onnxruntime 1.7.0
// The new include line was update by lite.ai.toolkit at 2021107 to make
// sure the 'onnxruntime_c_api.h' header can be include into this file
// correctly.
#include "onnxruntime/core/session/onnxruntime_c_api.h"

#ifdef __cplusplus
extern "C" {
Expand Down

0 comments on commit c9adaa6

Please sign in to comment.