Skip to content

[2026春季][T1-1-4] DiFanrui#88

Open
DiFanrui wants to merge 1 commit into
InfiniTensor:masterfrom
DiFanrui:2026-spring-DiFanrui-T1-1-4
Open

[2026春季][T1-1-4] DiFanrui#88
DiFanrui wants to merge 1 commit into
InfiniTensor:masterfrom
DiFanrui:2026-spring-DiFanrui-T1-1-4

Conversation

@DiFanrui

@DiFanrui DiFanrui commented Jun 20, 2026

Copy link
Copy Markdown

实现 T1-1-4 赛题的 5 个算子:rollcolumn_stackmodemeshgridcartesian_prod

所有算子采用 output-driven gather 模式,通过 ntl.load 手工指针算术在九齿 application 层实现数据重排布。

测试结果

全仓库: 929 passed, 0 failed, 88 skipped

tests/test_roll.py ...........          12 passed
tests/test_column_stack.py ...........  13 passed
tests/test_meshgrid.py ................ 26 passed
tests/test_cartesian_prod.py .........  14 passed
tests/test_mode.py ..................   24 passed
──────────────────────────────────────────────
5 个新增算子                          89 passed
全仓库                                929 passed, 0 failed

NVIDIA 平台截图

1-1-4-NV

国产平台

天数

天数设备信息 1-1-4-天数

沐曦

沐曦设备信息 1-1-4-沐曦

摩尔

摩尔设备信息 1-1-4-摩尔

@DiFanrui DiFanrui changed the title [2026春季][T1-1-4] Implement roll, column_stack, mode, meshgrid, cartes… [2026春季][T1-1-4] DiFanrui Jun 20, 2026
…ian_prod

Five data-rearrangement operators implemented using ninetoothed
output-driven gather pattern with ntl.load manual pointer arithmetic.

- roll: permute + ntl.load gather per dimension (1D-5D)
- column_stack: identity kernel with non-contiguous output views (0D-ND)
- meshgrid: reuses cartesian_prod kernel (0D, list arg, xy/ij)
- cartesian_prod: ntl.load + integer division/modulo per column
- mode: O(K^2) with ntl.sum + ntl.where + mask (K padded to pow2)

All 89 tests pass. Semantic verification for mode tie-breaking.

Co-Authored-By: Claude <noreply@anthropic.com>
@DiFanrui DiFanrui force-pushed the 2026-spring-DiFanrui-T1-1-4 branch from c878752 to 4152d07 Compare June 21, 2026 08:03
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.

1 participant