You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# See https://github.com/openxla/shardy/blob/f9d83e779a58b811b848c4edfaf68e88b636787d/shardy/dialect/sdy/ir/verifiers.cc#L647-L699 for the checks
2255
2255
ndevices =prod(last, mesh_axes)
2256
+
2256
2257
@assertallunique(first, mesh_axes) "mesh_axes must be unique"
2257
2258
@assert ndevices ==length(device_ids) "length(device_ids) should be same as \
2258
2259
prod(last, mesh_axes)"
2259
-
@assertall(x -> x ≥0, device_ids) "device_ids must be non-negative"
2260
-
@assert Base.sort(device_ids) ==collect(Int64, 0:(ndevices -1)) "sorted device_ids must be the same as iota(product(axes)), got $(Base.sort(device_ids))"
2260
+
@assertall(Base.Fix2(≥, 0), device_ids) "device_ids must be non-negative"
2261
+
@assert Base.sort(device_ids) ==0:(ndevices -1) "sorted device_ids must be the same \
2262
+
as iota(product(axes)), got \
2263
+
$(Base.sort(device_ids))"
2261
2264
2262
-
if Base.sort(device_ids) == device_ids
2263
-
# error: if the ordered device ids are the same as iota(product(axes)), no need to specify them for simplicity
2264
-
device_ids = Int64[]
2265
-
end
2265
+
# error: if the ordered device ids are the same as iota(product(axes)), no need to
0 commit comments