Unverified Commit c35e9441 authored by Shaden Smith's avatar Shaden Smith Committed by GitHub
Browse files

Removing () from assertion. (#307)

The parenthesis alter the evaluation of the assert() and it will always evaluate to True.
parent 9d07d756
......@@ -40,8 +40,7 @@ def flatten_dense_tensors_sub_partition_aligned(tensor_list,
dp,
max_elements_per_comm,
pg):
assert (max_elements_per_comm >= dp,
f"max_elements_per_comm {max_elements_per_comm} < dp {dp}")
assert max_elements_per_comm >= dp, f"max_elements_per_comm {max_elements_per_comm} < dp {dp}"
num_elements = sum(t.numel() for t in tensor_list)
log_dist("Total number of elements in model: {}, max elements per com: {}".format(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment