diff options
author | Chih-Hsuan Yen | 2021-06-03 17:37:31 +0800 |
---|---|---|
committer | Chih-Hsuan Yen | 2021-06-03 17:37:51 +0800 |
commit | 8ddd1e0bf5f9b951be1fcf2ec0b72465bd0098bc (patch) | |
tree | bc75453a12b17b4f368f1832542f22d250be2498 /clang.patch | |
parent | 75690f7c7fad657006726e3c9f9111c05d5a1ebb (diff) | |
download | aur-8ddd1e0bf5f9b951be1fcf2ec0b72465bd0098bc.tar.gz |
Enable CUDA and update patches for 1.8.0
Also enables orttraining and use shared libs
Diffstat (limited to 'clang.patch')
-rw-r--r-- | clang.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/clang.patch b/clang.patch new file mode 100644 index 000000000000..e1445eb36df2 --- /dev/null +++ b/clang.patch @@ -0,0 +1,40 @@ +diff --git a/onnxruntime/core/providers/cuda/reduction/reduction_functions.cc b/onnxruntime/core/providers/cuda/reduction/reduction_functions.cc +index 955df6d9a..f9fd53e15 100644 +--- a/onnxruntime/core/providers/cuda/reduction/reduction_functions.cc ++++ b/onnxruntime/core/providers/cuda/reduction/reduction_functions.cc +@@ -17,7 +17,7 @@ namespace cuda { + + namespace { + // std::make_reverse_iterator is not implemented in older versions of GCC +-#if !defined(__GNUC__) || __GNUC__ >= 5 ++#if !defined(__GNUC__) || __GNUC__ >= 5 || defined(__clang__) + using std::make_reverse_iterator; + #else + template <typename It> +@@ -39,7 +39,7 @@ optional<std::pair<int64_t, int64_t>> GetMinAndMaxContiguousAxes( + } + + // normalize axis values and sort +- const std::vector<int64_t> axes = [&original_axes, rank]() { ++ const std::vector<int64_t> axes = [&original_axes, rank]() -> std::vector<int64_t> { + std::vector<int64_t> result(original_axes); + std::for_each( + result.begin(), result.end(), +@@ -73,7 +73,7 @@ optional<std::pair<int64_t, int64_t>> GetMinAndMaxContiguousAxes( + } + + // expand axes over surrounding dimensions with value of 1 +- const int64_t min_axis = [&dims, &axes, &is_dim_one]() { ++ const int64_t min_axis = [&dims, &axes, &is_dim_one]() -> int64_t { + const auto& min_given_axis = axes.front(); + // note that std::reverse_iterator(it) refers to the element at (it-1) + // it -> reverse it: element offset of -1 +@@ -85,7 +85,7 @@ optional<std::pair<int64_t, int64_t>> GetMinAndMaxContiguousAxes( + return std::distance(dims.begin(), before_min_axis_rit.base()); + }(); + +- const int64_t max_axis = [&dims, &axes, &is_dim_one]() { ++ const int64_t max_axis = [&dims, &axes, &is_dim_one]() -> int64_t { + const auto& max_given_axis = axes.back(); + const auto after_max_given_axis_it = dims.begin() + max_given_axis + 1; + const auto after_max_axis_it = |