mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-01 23:30:35 +00:00
fix warning treated as error due to ignoring return status (#3739)
Co-authored-by: suffian khan <sukha@microsoft.com>
This commit is contained in:
parent
e529464a12
commit
ea0e2d1dde
1 changed files with 4 additions and 3 deletions
|
|
@ -105,11 +105,12 @@ int main(int argc, char* argv[]) {
|
|||
|
||||
InferenceSession session_object{so, *env};
|
||||
|
||||
Status st;
|
||||
CUDAExecutionProviderInfo xp_info{static_cast<OrtDevice::DeviceId>(world_rank)};
|
||||
session_object.RegisterExecutionProvider(std::make_unique<CUDAExecutionProvider>(xp_info));
|
||||
st = session_object.RegisterExecutionProvider(std::make_unique<CUDAExecutionProvider>(xp_info));
|
||||
ORT_ENFORCE(st == Status::OK(), "MPI rank ", world_rank, ": ", st.ErrorMessage());
|
||||
|
||||
std::string model_at_rank;
|
||||
Status st;
|
||||
if (world_rank == 0) {
|
||||
st = session_object.Load(params.model_stage0_name);
|
||||
ORT_ENFORCE(st == Status::OK(), "MPI rank ", world_rank, ": ", st.ErrorMessage());
|
||||
|
|
@ -214,4 +215,4 @@ int main(int, char* []) {
|
|||
ORT_NOT_IMPLEMENTED("P2P demo currently requires CUDA to run.");
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue