Skip to content

Add functional test for 2D block lowering of tensor pointers. #3876

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

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

chengjunlu
Copy link
Contributor

Add functional test for 2D block lowering of tensor pointers.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • third_party/intel/lib/TritonIntelGPUToLLVM/LoadStoreOpToLLVM.cpp: Language not supported
Comments suppressed due to low confidence (2)

python/test/unit/intel/test_block_load.py:25

  • [nitpick] The string representation in the str method uses inconsistent spacing around '='. Consider standardizing the formatting for clarity in logging and debugging.
return f"#triton_intel_gpu.dpas<{ {repeatCount={self.repeatCount}, systolicDepth={self.systolic_depth}, executionSize = {self.execution_size}, opsPerChan = {self.ops_per_chan}, threadsPerWarp = {self.threads_per_warp}, warpsPerCTA={self.warps_per_cta}, repCluster={self.rep_cluster}}}>"

python/test/unit/intel/test_block_load.py:199

  • There is a commented-out assertion intended to check for 2D block io support. Either uncomment and enable this assertion to validate the functionality or remove it to avoid confusion.
# assert '2d block io' in kernel.asm['llir']

warps_per_cta=[8, 4], rep_cluster=[4, 2]),
DpasLayout(repeatCount=8, systolic_depth=8, execution_size=16, ops_per_chan=1, threads_per_warp=32,
warps_per_cta=[8, 4], rep_cluster=[1, 1]),
# Layout for Xe
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Layout for Xe

Comment on lines +198 to +201
if support_block_io:
# assert '2d block io' in kernel.asm['llir']
pass
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we early exit when block io is supported?

Copy link
Contributor

Choose a reason for hiding this comment

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

Right. Also, the temp file will be left behind and should be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The check is going to make sure the 2D block IO is used. It based on the SPIRV extension. Right now there are too many unsupported 2D block IO variant of OCL interface.

Copy link
Contributor

Choose a reason for hiding this comment

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

icic, if we merge this PR before SPIRV extension is ready, then we probably want to remove line 199-201.


@pytest.mark.parametrize("M, N", [[M, N] for M, N in itertools.product([32, 64, 128, 256], [32, 64, 128, 256])])
@pytest.mark.parametrize("dtype_str", ["float32", "float16", "int8"])
@pytest.mark.parametrize("layout", layouts)
Copy link
Contributor

Choose a reason for hiding this comment

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

should we check for the same dpas layouts for test_block_load_dpas_layout?

@chengjunlu chengjunlu force-pushed the chengjun/add_tensor_pointer_load_test_case branch 7 times, most recently from 28e9720 to c9022fc Compare April 11, 2025 02:40
@chengjunlu chengjunlu marked this pull request as draft April 11, 2025 02:41
@chengjunlu
Copy link
Contributor Author

Convert to draft.
The test case based on #3896 and #3751

@chengjunlu chengjunlu force-pushed the chengjun/add_tensor_pointer_load_test_case branch from c9022fc to 25e3a8b Compare April 11, 2025 05:01
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.

4 participants