mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-09 17:28:58 +00:00
fix prefast warnings (#14931)
### Description Fixes prefast warnings Fixed [AB#11328](https://aiinfra.visualstudio.com/6a833879-cd9b-44a4-a9de-adc2d818f13c/_workitems/edit/11328) Fixed [AB#11329](https://aiinfra.visualstudio.com/6a833879-cd9b-44a4-a9de-adc2d818f13c/_workitems/edit/11329)
This commit is contained in:
parent
112a4d215a
commit
f14ab63c19
2 changed files with 4 additions and 4 deletions
|
|
@ -206,7 +206,7 @@ TEST(CheckpointApiTest, SaveOptimizerStateAsCheckpoint_ThenLoad_CUDA) {
|
|||
auto optim_uri = "testdata/training_api/adamw.onnx";
|
||||
|
||||
// Generate randomized weight values using synthetic data generator.
|
||||
const int64_t fc2_weight_dim_in = 10, fc2_weight_dim_out = 500, fc1_weight_dim_in = 500, fc1_weight_dim_out = 784;
|
||||
constexpr int64_t fc2_weight_dim_in = 10, fc2_weight_dim_out = 500, fc1_weight_dim_in = 500, fc1_weight_dim_out = 784;
|
||||
const std::vector<int64_t> fc1_weight_shape{fc1_weight_dim_in, fc1_weight_dim_out};
|
||||
const std::vector<int64_t> fc1_bias_shape{fc1_weight_dim_in};
|
||||
const std::vector<int64_t> fc2_weight_shape{fc2_weight_dim_in, fc2_weight_dim_out};
|
||||
|
|
|
|||
|
|
@ -114,9 +114,9 @@ void TestModuleExport(const std::vector<std::shared_ptr<IExecutionProvider>>& pr
|
|||
|
||||
#if defined(USE_CUDA)
|
||||
|
||||
const int64_t total_step_count = 100;
|
||||
const float initial_lr = 1e-3f;
|
||||
const int64_t resume_step = total_step_count / 2;
|
||||
constexpr int64_t total_step_count = 100;
|
||||
constexpr float initial_lr = 1e-3f;
|
||||
constexpr int64_t resume_step = total_step_count / 2;
|
||||
|
||||
void CompareValue(float expected, float output, float rtol = 1e-4, float atol = 1e-5) {
|
||||
ASSERT_NEAR(expected, output, atol);
|
||||
|
|
|
|||
Loading…
Reference in a new issue