Skip to content

Add option to use triton tsyrk_ex kernels in muon - #49

Closed
skyw wants to merge 13 commits into
mainfrom
skyw/support_syrk_in_ns_step
Closed

Add option to use triton tsyrk_ex kernels in muon#49
skyw wants to merge 13 commits into
mainfrom
skyw/support_syrk_in_ns_step

Conversation

@skyw

@skyw skyw commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@skyw
skyw requested a review from gdengk October 9, 2025 02:46
@copy-pr-bot

copy-pr-bot Bot commented Oct 9, 2025

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@skyw
skyw force-pushed the skyw/support_syrk_in_ns_step branch from 5c91bdb to 32110a0 Compare October 9, 2025 02:47
skyw added 9 commits October 8, 2025 19:48
Signed-off-by: Hao Wu <skyw@nvidia.com>
Signed-off-by: Hao Wu <skyw@nvidia.com>
Signed-off-by: Hao Wu <skyw@nvidia.com>
Signed-off-by: Hao Wu <skyw@nvidia.com>
Signed-off-by: Hao Wu <skyw@nvidia.com>
Signed-off-by: Hao Wu <skyw@nvidia.com>
Signed-off-by: Hao Wu <skyw@nvidia.com>
Signed-off-by: Hao Wu <skyw@nvidia.com>
Signed-off-by: Hao Wu <skyw@nvidia.com>
@skyw
skyw force-pushed the skyw/support_syrk_in_ns_step branch from 32110a0 to ef94309 Compare October 9, 2025 02:48
@skyw

skyw commented Oct 9, 2025

Copy link
Copy Markdown
Contributor Author

/ok to test ef94309

Signed-off-by: Hao Wu <skyw@nvidia.com>
@skyw

skyw commented Oct 9, 2025

Copy link
Copy Markdown
Contributor Author

/ok to test d6c89c9

Signed-off-by: Hao Wu <skyw@nvidia.com>
@skyw

skyw commented Oct 9, 2025

Copy link
Copy Markdown
Contributor Author

/ok to test c8f80ae

Comment thread tests/ci/L1_Tests_GPU.sh Outdated
python tests/test_scalar_optimizers.py --device=cuda
python tests/test_spectral_clipping_utils.py
python tests/test_triton_kernels.py TritonKernelsIntegerInputTest
python tests/test_triton_kernels.py

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests of float dtype will fail. So such failure are allowed in L1 Tests?

Output tensor of shape (N, N)
"""

assert a.dtype == torch.bfloat16, "Input tensor must be bfloat16"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this assertion is still needed.

logging.log_first_n(logging.INFO, "Using BF16 I/O kernels for Newton-Schulz iteration.", 1)
if use_syrk:
sm_version = torch.cuda.get_device_capability()
if sm_version in ((8, 0), (9, 0), (10, 0), (11, 0)):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel it's better to be placed in the init function otherwise this is getting called for every param.

skyw added 2 commits October 8, 2025 22:08
Signed-off-by: Hao Wu <skyw@nvidia.com>
Signed-off-by: Hao Wu <skyw@nvidia.com>
@skyw
skyw requested a review from a team as a code owner October 9, 2025 05:10
@skyw

skyw commented Oct 9, 2025

Copy link
Copy Markdown
Contributor Author

/ok to test dd5216b

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

Successfully merging this pull request may close these issues.

2 participants