Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] Does Flux support variable seqlens overlap? #52

Open
wplf opened this issue Feb 28, 2025 · 1 comment
Open

[QUESTION] Does Flux support variable seqlens overlap? #52

wplf opened this issue Feb 28, 2025 · 1 comment
Assignees

Comments

@wplf
Copy link

wplf commented Feb 28, 2025

Hi, thank you for great works.

Since we need to pass max_M to kernel, is this ok for us to pass a max_M and run kernel with input that is smaller than Max_M?

self.ag_gemm_op = flux.AGKernel(
            get_tp_group().device_group,
            1,  # One node
            8192,  # Max M. TODO: Pass in correctly.
            weight.shape[0],  # N
            weight.shape[1],  # K
            # TODO: Pass in input dtype correctly.
            # TODO: It would be nicer to modify flux to dispatch based on dtype
            # at run time, but I don't know what the downside would be.
            # Similar comment for max m.
            torch.float16,
            torch.float16,
            # Note: transpose_weight=False means that B is transposed
            transpose_weight=False,
            # Note: if local_copy=True, I hit the following runtime error:
            # /flux/src/all_gather/ths_op/all_gather_gemm_kernel.cc:648
            #   Check failed: 33554432((input.numel() * input.element_size()))
            #                 == 139836453421056((this->chunk_size))
            local_copy=False,
)
@wenlei-bao
Copy link
Collaborator

@wplf Yes.

@wenlei-bao wenlei-bao self-assigned this Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants