From 6740528b98bd0ce784d8e8c089829241d1e3e9c3 Mon Sep 17 00:00:00 2001 From: PeixuanZuo <94887879+PeixuanZuo@users.noreply.github.com> Date: Tue, 1 Nov 2022 09:25:57 +0800 Subject: [PATCH] [ROCm] Fix bug for rocm ep build using MS GSL 4.0.0 (#13525) --- orttraining/orttraining/training_ops/rocm/math/div_grad.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orttraining/orttraining/training_ops/rocm/math/div_grad.cc b/orttraining/orttraining/training_ops/rocm/math/div_grad.cc index 3f0b00e17a5c2..68226c96348a6 100644 --- a/orttraining/orttraining/training_ops/rocm/math/div_grad.cc +++ b/orttraining/orttraining/training_ops/rocm/math/div_grad.cc @@ -33,7 +33,7 @@ TensorShapeVector prepended_dimension_1(const TensorShape& shape, size_t total_r // https://github.com/onnx/onnx/blob/main/docs/Broadcasting.md // for property 3 of Multidirectional Broadcasting, we need to prepended with a dimension of length 1. if (input_rank > 0) - std::copy(shape.GetDims().cbegin(), shape.GetDims().cend(), &dims[total_rank - input_rank]); + std::copy(shape.GetDims().begin(), shape.GetDims().end(), &dims[total_rank - input_rank]); return dims; }