From 0f3a067d3a7d42bbc860b97d7ed39e5d7cdd5d47 Mon Sep 17 00:00:00 2001 From: mindest <30493312+mindest@users.noreply.github.com> Date: Fri, 27 Oct 2023 11:29:55 +0800 Subject: [PATCH] [FIX] reorder initializer (#18097) ### Description Fix building error when with collective ops: error is thrown because `device_mesh_axis` will be initialized after `cond`. --- onnxruntime/contrib_ops/cuda/collective/sharding_spec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/contrib_ops/cuda/collective/sharding_spec.h b/onnxruntime/contrib_ops/cuda/collective/sharding_spec.h index 451d44b4bd434..6bdf5699c2682 100644 --- a/onnxruntime/contrib_ops/cuda/collective/sharding_spec.h +++ b/onnxruntime/contrib_ops/cuda/collective/sharding_spec.h @@ -117,7 +117,7 @@ class AxisPartitionSpec { // A normal ctor. // TODO(wechi): Consider to hide it and revise the `public` members/functions // exposed to the user. - AxisPartitionSpec(Condition cond_, int device_mesh_axis_) : device_mesh_axis(device_mesh_axis_), cond(cond_) {} + AxisPartitionSpec(Condition cond_, int device_mesh_axis_) : cond(cond_), device_mesh_axis(device_mesh_axis_) {} // Helper to debug and generate error message; e.g., // "RS[0]".