mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
Added fixes for Clang on Win64
This commit is contained in:
parent
9335cf102a
commit
a79d375d24
4 changed files with 5 additions and 5 deletions
|
|
@ -258,7 +258,7 @@ void LogRuntimeError(uint32_t session_id, const common::Status& status, const ch
|
|||
} while (0)
|
||||
|
||||
// C++ Core Guideline check suppression.
|
||||
#if defined(_MSC_VER) && !defined(__NVCC__)
|
||||
#if defined(_MSC_VER) && !defined(__NVCC__) && !defined(__clang__)
|
||||
#define GSL_SUPPRESS(tag) [[gsl::suppress(tag)]]
|
||||
#else
|
||||
#define GSL_SUPPRESS(tag)
|
||||
|
|
|
|||
|
|
@ -1210,7 +1210,7 @@ void RunInParallelSection(ThreadPoolParallelSection &ps,
|
|||
// loops to execute from the current parallel section.
|
||||
std::function<void(unsigned)> worker_fn = [&ps](unsigned par_idx) {
|
||||
while (ps.active) {
|
||||
if (!ps.current_loop) {
|
||||
if (ps.current_loop.load() == nullptr) {
|
||||
onnxruntime::concurrency::SpinPause();
|
||||
} else {
|
||||
ps.workers_in_loop++;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include "core/common/common.h"
|
||||
#include "core/framework/op_kernel.h"
|
||||
#include "core/providers/cpu//tensor/concat.h"
|
||||
#include "core/providers/cpu/tensor/concat.h"
|
||||
|
||||
namespace onnxruntime {
|
||||
|
||||
|
|
|
|||
|
|
@ -85,8 +85,8 @@ ORT_API_STATUS_IMPL(SetGlobalSpinControl, _Inout_ OrtThreadingOptions* tp_option
|
|||
if (!(allow_spinning == 1 || allow_spinning == 0)) {
|
||||
return OrtApis::CreateStatus(ORT_INVALID_ARGUMENT, "Received invalid value for allow_spinning. Valid values are 0 or 1");
|
||||
}
|
||||
tp_options->intra_op_thread_pool_params.allow_spinning = allow_spinning;
|
||||
tp_options->inter_op_thread_pool_params.allow_spinning = allow_spinning;
|
||||
tp_options->intra_op_thread_pool_params.allow_spinning = static_cast<bool>(allow_spinning);
|
||||
tp_options->inter_op_thread_pool_params.allow_spinning = static_cast<bool>(allow_spinning);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue