[Docs]: Fact-check T.tile.bitwise_rshift API - #1676
Open
zhangfei-machao wants to merge 3 commits into
Open
Conversation
|
👋 Hi! Thank you for contributing to the TileLang project. Please remember to run We appreciate you taking this step! Our team will review your contribution, and we look forward to your awesome work! 🚀 |
Mark 9 test functions as low_priority to reduce PR CI runtime: - test_bitwise_rshift_1d (24 cases, shape variant) - test_bitwise_rshift_boundary_int16/int32 (32 cases, boundary edge) - test_bitwise_rshift_non_aligned/_ascendc_xfail (16 cases, non-aligned) - test_bitwise_rshift_int8_xfail (4 cases, unsupported dtype) - test_bitwise_rshift_int64_skip (4 cases, segfault skip) - test_bitwise_rshift_float_xfail (4 cases, unsupported dtype) - test_bitwise_rshift_scalar_dtype_mismatch (8 cases, dtype edge case) Keep 2 core semantic tests in PR CI: - test_bitwise_rshift_signed_semantics (12 cases, arithmetic shift) - test_bitwise_rshift_unsigned_high_bits (8 cases, logical shift) PR CI: 26 rshift tests (down from 128), ~3.7min runtime.
Author
|
/re-test |
|
🔄 Re-running failed jobs Original workflow run: View details Only the failed jobs will be re-executed. |
Author
|
/re-test |
|
🔄 Re-running failed jobs Original workflow run: View details Only the failed jobs will be re-executed. |
Author
|
/re-test |
|
🔄 Re-running failed jobs Original workflow run: View details Only the failed jobs will be re-executed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
文件 类型 改动说明
docs/language/tile_bitwise_rshift.md 新增 校验后的 API 文档,包含函数原型、参数说明、dtype 支持矩阵、约束条件、已知限制
tilelang/language/ascend_tile.py 修改 bitwise_rshift docstring 扩充:补充移位语义(有符号算术/无符号逻辑)、支持 dtype、UB scope、scalarValue 自动类型转换
testing/python/language/test_tilelang_ascend_language_elementwise.py 修改 新增 112 个参数化测试用例,覆盖签名语义、dtype、shape、边界值、非对齐、不支持类型
2.1 约束测试(动态验证)
验证项 测什么
有符号算术右移 int16/int32 负值输入,shift=1/2/4,AscendC+PTO
无符号逻辑右移 uint16/uint32 高位为 1 的值,shift=1/4,AscendC+PTO
1D shape 支持 int16/uint16/int32/uint32,1D buffer,shift=1/4/8
边界值 shift=0 int16/uint16/int32/uint32,AscendC+PTO
边界值 shift=max-1 int16 shift=15,int32 shift=31
边界值 shift=max int16 shift=16,int32 shift=32
scalarValue 类型不匹配 Python int(int32 IR)传入 int16/uint16 操作
非对齐 shape (PTO) shape=(1024,100),4 dtype,shift=1/4
非对齐 shape (AscendC) 同上,AscendC 后端
int8/uint8 不支持 编译 int8/uint8 kernel
int64/uint64 不支持 编译 int64/uint64 kernel
float16/float32 不支持 编译 float kernel
2.2 正式测试文件
测试函数 用例数 测什么
test_bitwise_rshift_signed_semantics 12 有符号类型算术右移语义(int16/int32,shift=1/2/4,AscendC+PTO)
test_bitwise_rshift_unsigned_high_bits 8 无符号类型逻辑右移语义(uint16/uint32,高位为 1,shift=1/4,AscendC+PTO)
test_bitwise_rshift_1d 24 1D buffer 支持(4 dtype × shift=1/4/8 × AscendC+PTO)
test_bitwise_rshift_boundary_int16 16 16-bit 边界值(int16/uint16,shift=0/1/15/16,AscendC+PTO)
test_bitwise_rshift_boundary_int32 16 32-bit 边界值(int32/uint32,shift=0/1/31/32,AscendC+PTO)
test_bitwise_rshift_non_aligned 8 非对齐 shape PTO 精度(4 dtype,shift=1/4)
test_bitwise_rshift_non_aligned_ascendc_xfail 8 非对齐 shape AscendC 精度错误(预期失败)
test_bitwise_rshift_int8_xfail 4 int8/uint8 编译失败(预期失败)
test_bitwise_rshift_int64_skip 4 int64/uint64 编译器段错误(跳过)
test_bitwise_rshift_float_xfail 4 float16/float32 编译失败(预期失败)
test_bitwise_rshift_scalar_dtype_mismatch 8 scalarValue dtype 与 dst 不一致时 codegen 自动转换
3.1 Pytest 标签
本次新增测试未使用额外 pytest 标签。
汇总: