Skip to content

remove dead code in silu_and_mul kernel - creates output offsets (for 1D), expect n_elements param... but no need...#6

Merged
hannahli-nv merged 3 commits intoNVIDIA:mainfrom
lessw2020:update-silu_mul-kernel
Dec 11, 2025
Merged

remove dead code in silu_and_mul kernel - creates output offsets (for 1D), expect n_elements param... but no need...#6
hannahli-nv merged 3 commits intoNVIDIA:mainfrom
lessw2020:update-silu_mul-kernel

Conversation

@lessw2020
Copy link
Copy Markdown
Contributor

@lessw2020 lessw2020 commented Dec 10, 2025

remove dead code:

out_offsets = bid * hidden_size + offsets

computes this but never used since kernel is 2D.
Similarly, the input param:
n_elements
is never used so doesn't need to be in the signature.

Left over from 1D original work?

remove dead code
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Dec 10, 2025

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.

@lessw2020 lessw2020 changed the title remove dead code in silu_and_mul kernel - creates output offsets (for 1D) but no need... remove dead code in silu_and_mul kernel - creates output offsets (for 1D), expect n_elements param... but no need... Dec 11, 2025
@hannahli-nv
Copy link
Copy Markdown
Collaborator

Thank you for pointing out this issue. These codes are indeed dead code. Before we can merge this PR, there are a few remaining items:

  • To ensure the tests run properly, please remove the remaining usages of n_elements in this PR: code 1 and code 2.

  • As this is your first contribution to TileGym, please submit your signed CLA document as outlined in CONTRIBUTING.md.

Completing these steps will help us proceed with merging the PR.

Since TileGym's CI is not yet available, we will conduct manual testing to verify the code.

Thank you.

@lessw2020
Copy link
Copy Markdown
Contributor Author

Thanks @hannahli-nv
Let me remove the param from the calling code.

@lessw2020
Copy link
Copy Markdown
Contributor Author

Hi @hannahli-nv
Thanks for the review. Pulled the remaining references, and ran the benchmark to verify all working nicely.

@hannahli-nv
Copy link
Copy Markdown
Collaborator

We have completed manual testing for this PR, and all tests passed.
I will merge the PR. Thank you @lessw2020 for your contribution.

@hannahli-nv hannahli-nv merged commit 42538cd into NVIDIA:main Dec 11, 2025
@lessw2020 lessw2020 deleted the update-silu_mul-kernel branch December 11, 2025 15:07
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