Skip to content

[TRITON] Move triton_tests into respective folders - #1602

Merged
Boss2002n merged 7 commits into
mainfrom
amd/satya/organise_triton_tests
Dec 12, 2025
Merged

Boss2002n merged 7 commits into
mainfrom
amd/satya/organise_triton_tests

Conversation

@Boss2002n

@Boss2002n Boss2002n commented Dec 10, 2025

Copy link
Copy Markdown
Contributor

Reorganize triton_tests into categorized folder structure

Restructured the triton_tests directory to improve code organization and maintainability by grouping related tests into logical categories.

Easier to run specific test categories, for example:
pytest aiter/op_tests/triton_tests/ # All tests
pytest aiter/op_tests/triton_tests/gemm/ # Just GEMM tests
pytest aiter/op_tests/triton_tests/gemm/basic/ # Just basic GEMM tests
pytest aiter/op_tests/triton_tests/moe/ # Just MOE tests
and so on

@Boss2002n Boss2002n self-assigned this Dec 10, 2025
@Boss2002n
Boss2002n marked this pull request as ready for review December 10, 2025 07:18
@Boss2002n
Boss2002n requested review from a team and Copilot December 10, 2025 07:18
@Boss2002n
Boss2002n force-pushed the amd/satya/organise_triton_tests branch from cd94594 to 6bc2875 Compare December 10, 2025 07:19

Copilot AI left a comment

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.

Pull request overview

This PR reorganizes the triton test files by moving them into a more structured folder hierarchy, updating all import statements to reflect the new paths.

Key Changes:

  • Updated import statements across multiple test files to use absolute paths starting with op_tests.triton_tests
  • Reorganized tests into categorized subdirectories (gemm/basic, gemm/fused, gemm/feed_forward, gemm/batched, quant, moe, rope)
  • Changed relative imports to absolute imports for better clarity and maintainability

Reviewed changes

Copilot reviewed 13 out of 62 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
op_tests/triton_tests/test_fused_kv_cache.py Updated imports to reference rope tests from new op_tests.triton_tests.rope path
op_tests/triton_tests/test_activation.py Updated imports to reference quant and gemm tests from new nested folder structure
op_tests/triton_tests/rope/test_rope.py Updated import to use absolute path for ref_rope functions
op_tests/triton_tests/quant/test_fused_mxfp4_quant.py Updated imports to reference gemm and quant tests from new folder structure
op_tests/triton_tests/quant/test_fused_fp8_quant.py Updated import to reference quant test from new path
op_tests/triton_tests/moe/test_moe_mx.py Updated import to reference moe test from new path
op_tests/triton_tests/gemm/fused/test_fused_gemm_afp4wfp4_split_cat.py Updated import to reference batched gemm test from new path
op_tests/triton_tests/gemm/fused/test_fused_gemm_afp4wfp4_mul_add.py Updated imports to reference basic gemm tests from new path
op_tests/triton_tests/gemm/fused/test_fused_gemm_afp4wfp4_a16w16.py Updated imports to reference basic gemm tests from new nested structure
op_tests/triton_tests/gemm/fused/test_fused_gemm_a8w8_blockscale_a16w16.py Updated imports to reference basic gemm tests from new path
op_tests/triton_tests/gemm/feed_forward/test_ff_a16w16_fused.py Updated imports to reference basic gemm and feed_forward utils from new paths
op_tests/triton_tests/gemm/feed_forward/test_ff_a16w16.py Updated imports to reference feed_forward utils and basic gemm from new paths
op_tests/triton_tests/gemm/basic/test_gemm_a16w16_gated.py Updated import to reference basic gemm test from new path

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread op_tests/triton_tests/quant/test_fused_mxfp4_quant.py
Comment thread op_tests/triton_tests/quant/test_fused_mxfp4_quant.py Outdated
@Boss2002n Boss2002n changed the title Move triton_tests into folders [TRITON] Move triton_tests into folders Dec 10, 2025
@Boss2002n Boss2002n changed the title [TRITON] Move triton_tests into folders [TRITON] Move triton_tests into respective folders Dec 10, 2025
@Boss2002n
Boss2002n force-pushed the amd/satya/organise_triton_tests branch from ce049e2 to 4724476 Compare December 10, 2025 14:00
@Boss2002n
Boss2002n requested a review from vgokhale December 10, 2025 16:40
brunomazzottiamd

This comment was marked as resolved.

@brunomazzottiamd brunomazzottiamd left a comment

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.

LGTM!

Comment thread op_tests/op_benchmarks/triton/bench_deepgemm_attention.py
@Boss2002n
Boss2002n force-pushed the amd/satya/organise_triton_tests branch 2 times, most recently from 5829565 to e486fc7 Compare December 11, 2025 12:20
@Boss2002n
Boss2002n force-pushed the amd/satya/organise_triton_tests branch from e486fc7 to 340d63f Compare December 11, 2025 12:38

@lucas-santos-amd lucas-santos-amd left a comment

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.

With a PR this big, it's a good idea to wait for the Triton CI to pass, even though it isn't required to merge. That aside, LGTM!

@brunomazzottiamd

Copy link
Copy Markdown
Contributor

With a PR this big, it's a good idea to wait for the Triton CI to pass, even though it isn't required to merge. That aside, LGTM!

It's really mandatory all Triton tests to pass.

@brunomazzottiamd
brunomazzottiamd self-requested a review December 12, 2025 14:26

@vgokhale vgokhale left a comment

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.

LGTM!

@Boss2002n
Boss2002n merged commit f7f46c5 into main Dec 12, 2025
27 of 32 checks passed
@Boss2002n
Boss2002n deleted the amd/satya/organise_triton_tests branch December 12, 2025 16:22
zhuyuhua-v pushed a commit that referenced this pull request Dec 17, 2025
* Move triton_tests into folders

* fix import errors

* formatting fix

* remove misc folder

* Update op_tests/triton_tests/quant/test_fused_mxfp4_quant.py - copilot suggestion

* remove import workarounds

* fix op_benchmarks imports
ZhangLirong-amd pushed a commit that referenced this pull request Dec 29, 2025
* Move triton_tests into folders

* fix import errors

* formatting fix

* remove misc folder

* Update op_tests/triton_tests/quant/test_fused_mxfp4_quant.py - copilot suggestion

* remove import workarounds

* fix op_benchmarks imports
valarLip pushed a commit that referenced this pull request Mar 18, 2026
* Move triton_tests into folders

* fix import errors

* formatting fix

* remove misc folder

* Update op_tests/triton_tests/quant/test_fused_mxfp4_quant.py - copilot suggestion

* remove import workarounds

* fix op_benchmarks imports
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.

5 participants