Skip to content

Commit 7bb5cd3

Browse files
authored
Remember some constructor args in AllToAll to make life more convenient for users. (#2)
Being able to query some of the setup parameters from the AllToAll class would make client code a bit simpler/safer, e.g. see pplx_dispatch_combine.py from vllm-project/vllm#15956 cc @abcdabcd987 , @tlrmchlsmth Signed-off-by: Bill Nell <[email protected]>
1 parent 019abe1 commit 7bb5cd3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/pplx_kernels/all_to_all.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ def __init__(
2121
assert world_size % dp_size == 0
2222
assert world_size // dp_size > 1
2323

24+
self.world_size = world_size
25+
self.dp_size = dp_size
26+
self.max_num_tokens = max_num_tokens
2427
self._has_scales = hidden_dim_scale_bytes > 0
2528

2629
self._ptr = _ops.all_to_all_create(

0 commit comments

Comments
 (0)