mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-14 20:48:00 +00:00
Fix two prefast warnings (#13211)
This commit is contained in:
parent
962fee5fe5
commit
c780c4a2b9
2 changed files with 3 additions and 3 deletions
|
|
@ -64,7 +64,7 @@ common::Status TrainingAgent::RunForward(const std::vector<OrtValue>& feeds, std
|
|||
state.SetProgramCounterStart(0);
|
||||
state.SetProgramCounterEnd(fw_program_counter_end_);
|
||||
|
||||
const int32_t partial_graph_index = 0;
|
||||
constexpr int32_t partial_graph_index = 0;
|
||||
return RunCore(feeds, fetches, state, *fw_feeds_fetches_manager_, cache, partial_graph_index);
|
||||
}
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ common::Status TrainingAgent::RunBackward(const std::vector<OrtValue>& feeds, st
|
|||
PartialGraphExecutionState& state) {
|
||||
state.SetProgramCounterStart(fw_program_counter_end_);
|
||||
state.SetProgramCounterEnd(bw_program_counter_end_);
|
||||
const int32_t partial_graph_index = 1;
|
||||
constexpr int32_t partial_graph_index = 1;
|
||||
return RunCore(feeds, fetches, state, *bw_feeds_fetches_manager_, nullptr, partial_graph_index);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ Status SoftmaxCrossEntropyLoss<T, Tin>::ComputeInternal(OpKernelContext* ctx) co
|
|||
reduction_buffer.get(),
|
||||
buffer_size));
|
||||
} else {
|
||||
const TBuf normalize_factor = static_cast<TBuf>(1.0f);
|
||||
constexpr TBuf normalize_factor = static_cast<TBuf>(1.0f);
|
||||
CUDA_RETURN_IF_ERROR(cudaMemcpyAsync(normalize_factor_data.get(), &normalize_factor, sizeof(TBuf), cudaMemcpyHostToDevice, Stream()));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue