Skip to content

Commit

Permalink
[FIX] reorder initializer (microsoft#18097)
Browse files Browse the repository at this point in the history
### Description
Fix building error when with collective ops: error is thrown because
`device_mesh_axis` will be initialized after `cond`.
  • Loading branch information
mindest authored and kleiti committed Mar 22, 2024
1 parent 4af160a commit 1e54310
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion onnxruntime/contrib_ops/cuda/collective/sharding_spec.h
Original file line number Diff line number Diff line change
Expand Up @@ -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]".
Expand Down

0 comments on commit 1e54310

Please sign in to comment.