Fix [prefast:Warning]: C26814 (#12897)

fix C26814
This commit is contained in:
pengwa 2022-09-09 08:26:48 +08:00 committed by GitHub
parent 5d55b0730e
commit b5327595f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -14,7 +14,7 @@ using std::vector;
namespace onnxruntime {
namespace test {
static const int kMinOpsetVersion = 17;
static constexpr int kMinOpsetVersion = 17;
static void TestNaiveDFTFloat(bool onesided) {
OpTester test("DFT", kMinOpsetVersion);

View file

@ -33,7 +33,7 @@ Status AdamWOptimizerBase::PrepareForCompute(OpKernelContext* ctx, AdamWOptimize
prepare.grouped_tensor_sizes.resize(prepare.num_of_weights);
prepare.grouped_tensor_pointers.resize(prepare.num_of_weights);
const double cost = 1.0;
static constexpr double cost = 1.0;
auto* tp = ctx->GetOperatorThreadPool();
concurrency::ThreadPool::TryParallelFor(