Skip to content

Fix the dtype values of zero-dimensional tensors in the premake functions#67

Merged
voltjia merged 1 commit intomasterfrom
fix-dtype-values-of-0-dim-tensors-in-premake-functions
Jan 14, 2026
Merged

Fix the dtype values of zero-dimensional tensors in the premake functions#67
voltjia merged 1 commit intomasterfrom
fix-dtype-values-of-0-dim-tensors-in-premake-functions

Conversation

@voltjia
Copy link
Collaborator

@voltjia voltjia commented Jan 14, 2026

pytest output:

============================= test session starts ==============================
platform linux -- Python 3.10.16, pytest-9.0.2, pluggy-1.6.0
rootdir: /home/huangjiacheng/ntops
configfile: pyproject.toml
plugins: anyio-4.12.1, cov-7.0.0
collected 676 items

tests/test_abs.py ........                                               [  1%]
tests/test_add.py ........                                               [  2%]
tests/test_addmm.py ..                                                   [  2%]
tests/test_bitwise_and.py ................                               [  5%]
tests/test_bitwise_not.py ................                               [  7%]
tests/test_bitwise_or.py ................                                [  9%]
tests/test_bmm.py ..                                                     [ 10%]
tests/test_clamp.py ........                                             [ 11%]
tests/test_cos.py ........                                               [ 12%]
tests/test_div.py .s..s..s..s..s..s..s..s.                               [ 15%]
tests/test_dropout.py ........                                           [ 17%]
tests/test_eq.py ........                                                [ 18%]
tests/test_exp.py ........                                               [ 19%]
tests/test_ge.py ........                                                [ 20%]
tests/test_gelu.py .s.s.s.s.s.s.s.s                                      [ 23%]
tests/test_gt.py ........                                                [ 24%]
tests/test_isinf.py ........                                             [ 25%]
tests/test_isnan.py ........                                             [ 26%]
tests/test_layer_norm.py ............................................... [ 33%]
.................................................                        [ 40%]
tests/test_le.py ........                                                [ 42%]
tests/test_lt.py ........                                                [ 43%]
tests/test_matmul.py ........                                            [ 44%]
tests/test_mm.py ..                                                      [ 44%]
tests/test_mul.py ........                                               [ 45%]
tests/test_ne.py ........                                                [ 47%]
tests/test_neg.py ........                                               [ 48%]
tests/test_pow.py ........                                               [ 49%]
tests/test_relu.py ................                                      [ 51%]
tests/test_rms_norm.py ................................................. [ 59%]
...............                                                          [ 61%]
tests/test_rotary_position_embedding.py ................................ [ 65%]
........................................................................ [ 76%]
........................                                                 [ 80%]
tests/test_rsqrt.py ........                                             [ 81%]
tests/test_scaled_dot_product_attention.py ............................. [ 85%]
.................................................                        [ 92%]
tests/test_sigmoid.py ........                                           [ 94%]
tests/test_silu.py ........                                              [ 95%]
tests/test_sin.py ........                                               [ 96%]
tests/test_softmax.py ........                                           [ 97%]
tests/test_sub.py ........                                               [ 98%]
tests/test_tanh.py ........                                              [100%]

=============================== warnings summary ===============================
tests/test_isinf.py: 12 warnings
  /home/huangjiacheng/.ninetoothed/e1f815a2d9d841f72f337e729448eb51cf763ebc8f4616cb50e283a7db760447.py:15: UserWarning: Logical operators 'and' and 'or' are deprecated for non-scalar tensors; please use '&' or '|' instead
    triton.language.store(ninetoothed_tensor_741_pointers + (ninetoothed_tensor_741_index_0 * ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_69 + triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_69)[::,]) * ninetoothed_ninetoothed_tensor_741_stride_0, pos_result or neg_result, mask=True & (ninetoothed_tensor_741_index_0 < (ninetoothed_ninetoothed_tensor_741_size_0 - (ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_69 - 1) - 1 + ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_69 - 1) // ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_69 + 1) & (triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_69)[::,] < ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_69) & (ninetoothed_tensor_741_index_0 * ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_69 + triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_69)[::,] < ninetoothed_ninetoothed_tensor_741_size_0) & (ninetoothed_tensor_741_index_0 * ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_69 + triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_69)[::,] < ninetoothed_ninetoothed_tensor_741_size_0))
  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

tests/test_isinf.py: 12 warnings
  /home/huangjiacheng/.ninetoothed/08f00410bd95f52b1eb22854ceaf6b6e0fca5afb72babf7de0997209c7e20c9b.py:15: UserWarning: Logical operators 'and' and 'or' are deprecated for non-scalar tensors; please use '&' or '|' instead
    triton.language.store(ninetoothed_tensor_749_pointers + ((ninetoothed_tensor_749_index_0 * ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_70 + triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_70)[::,]) // ninetoothed_ninetoothed_tensor_749_size_1 * ninetoothed_ninetoothed_tensor_749_stride_0 + (ninetoothed_tensor_749_index_0 * ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_70 + triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_70)[::,]) % ninetoothed_ninetoothed_tensor_749_size_1 * ninetoothed_ninetoothed_tensor_749_stride_1), pos_result or neg_result, mask=True & (ninetoothed_tensor_749_index_0 < (ninetoothed_ninetoothed_tensor_749_size_0 * ninetoothed_ninetoothed_tensor_749_size_1 - (ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_70 - 1) - 1 + ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_70 - 1) // ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_70 + 1) & (triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_70)[::,] < ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_70) & (ninetoothed_tensor_749_index_0 * ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_70 + triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_70)[::,] < ninetoothed_ninetoothed_tensor_749_size_0 * ninetoothed_ninetoothed_tensor_749_size_1) & ((ninetoothed_tensor_749_index_0 * ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_70 + triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_70)[::,]) // ninetoothed_ninetoothed_tensor_749_size_1 < ninetoothed_ninetoothed_tensor_749_size_0) & ((ninetoothed_tensor_749_index_0 * ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_70 + triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_70)[::,]) % ninetoothed_ninetoothed_tensor_749_size_1 < ninetoothed_ninetoothed_tensor_749_size_1))
  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

tests/test_isinf.py: 12 warnings
  /home/huangjiacheng/.ninetoothed/186884898cdcf8c61ae23fe270f4c30e6e4085d93bc193e17245cbbb584055cb.py:15: UserWarning: Logical operators 'and' and 'or' are deprecated for non-scalar tensors; please use '&' or '|' instead
    triton.language.store(ninetoothed_tensor_757_pointers + ((ninetoothed_tensor_757_index_0 * ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_71 + triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_71)[::,]) // (ninetoothed_ninetoothed_tensor_757_size_1 * ninetoothed_ninetoothed_tensor_757_size_2) * ninetoothed_ninetoothed_tensor_757_stride_0 + (ninetoothed_tensor_757_index_0 * ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_71 + triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_71)[::,]) % (ninetoothed_ninetoothed_tensor_757_size_1 * ninetoothed_ninetoothed_tensor_757_size_2) // ninetoothed_ninetoothed_tensor_757_size_2 * ninetoothed_ninetoothed_tensor_757_stride_1 + (ninetoothed_tensor_757_index_0 * ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_71 + triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_71)[::,]) % (ninetoothed_ninetoothed_tensor_757_size_1 * ninetoothed_ninetoothed_tensor_757_size_2) % ninetoothed_ninetoothed_tensor_757_size_2 * ninetoothed_ninetoothed_tensor_757_stride_2), pos_result or neg_result, mask=True & (ninetoothed_tensor_757_index_0 < (ninetoothed_ninetoothed_tensor_757_size_0 * ninetoothed_ninetoothed_tensor_757_size_1 * ninetoothed_ninetoothed_tensor_757_size_2 - (ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_71 - 1) - 1 + ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_71 - 1) // ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_71 + 1) & (triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_71)[::,] < ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_71) & (ninetoothed_tensor_757_index_0 * ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_71 + triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_71)[::,] < ninetoothed_ninetoothed_tensor_757_size_0 * ninetoothed_ninetoothed_tensor_757_size_1 * ninetoothed_ninetoothed_tensor_757_size_2) & ((ninetoothed_tensor_757_index_0 * ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_71 + triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_71)[::,]) // (ninetoothed_ninetoothed_tensor_757_size_1 * ninetoothed_ninetoothed_tensor_757_size_2) < ninetoothed_ninetoothed_tensor_757_size_0) & ((ninetoothed_tensor_757_index_0 * ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_71 + triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_71)[::,]) % (ninetoothed_ninetoothed_tensor_757_size_1 * ninetoothed_ninetoothed_tensor_757_size_2) // ninetoothed_ninetoothed_tensor_757_size_2 < ninetoothed_ninetoothed_tensor_757_size_1) & ((ninetoothed_tensor_757_index_0 * ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_71 + triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_71)[::,]) % (ninetoothed_ninetoothed_tensor_757_size_1 * ninetoothed_ninetoothed_tensor_757_size_2) % ninetoothed_ninetoothed_tensor_757_size_2 < ninetoothed_ninetoothed_tensor_757_size_2))
  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

tests/test_isinf.py: 12 warnings
  /home/huangjiacheng/.ninetoothed/78f856f56af91b71d3158ad11c8487903d6a26469232b1ffbfd9aa9b03d42644.py:15: UserWarning: Logical operators 'and' and 'or' are deprecated for non-scalar tensors; please use '&' or '|' instead
    triton.language.store(ninetoothed_tensor_765_pointers + ((ninetoothed_tensor_765_index_0 * ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_72 + triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_72)[::,]) // (ninetoothed_ninetoothed_tensor_765_size_1 * (ninetoothed_ninetoothed_tensor_765_size_2 * ninetoothed_ninetoothed_tensor_765_size_3)) * ninetoothed_ninetoothed_tensor_765_stride_0 + (ninetoothed_tensor_765_index_0 * ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_72 + triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_72)[::,]) % (ninetoothed_ninetoothed_tensor_765_size_1 * (ninetoothed_ninetoothed_tensor_765_size_2 * ninetoothed_ninetoothed_tensor_765_size_3)) // (ninetoothed_ninetoothed_tensor_765_size_2 * ninetoothed_ninetoothed_tensor_765_size_3) * ninetoothed_ninetoothed_tensor_765_stride_1 + (ninetoothed_tensor_765_index_0 * ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_72 + triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_72)[::,]) % (ninetoothed_ninetoothed_tensor_765_size_1 * (ninetoothed_ninetoothed_tensor_765_size_2 * ninetoothed_ninetoothed_tensor_765_size_3)) % (ninetoothed_ninetoothed_tensor_765_size_2 * ninetoothed_ninetoothed_tensor_765_size_3) // ninetoothed_ninetoothed_tensor_765_size_3 * ninetoothed_ninetoothed_tensor_765_stride_2 + (ninetoothed_tensor_765_index_0 * ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_72 + triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_72)[::,]) % (ninetoothed_ninetoothed_tensor_765_size_1 * (ninetoothed_ninetoothed_tensor_765_size_2 * ninetoothed_ninetoothed_tensor_765_size_3)) % (ninetoothed_ninetoothed_tensor_765_size_2 * ninetoothed_ninetoothed_tensor_765_size_3) % ninetoothed_ninetoothed_tensor_765_size_3 * ninetoothed_ninetoothed_tensor_765_stride_3), pos_result or neg_result, mask=True & (ninetoothed_tensor_765_index_0 < (ninetoothed_ninetoothed_tensor_765_size_0 * ninetoothed_ninetoothed_tensor_765_size_1 * ninetoothed_ninetoothed_tensor_765_size_2 * ninetoothed_ninetoothed_tensor_765_size_3 - (ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_72 - 1) - 1 + ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_72 - 1) // ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_72 + 1) & (triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_72)[::,] < ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_72) & (ninetoothed_tensor_765_index_0 * ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_72 + triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_72)[::,] < ninetoothed_ninetoothed_tensor_765_size_0 * ninetoothed_ninetoothed_tensor_765_size_1 * ninetoothed_ninetoothed_tensor_765_size_2 * ninetoothed_ninetoothed_tensor_765_size_3) & ((ninetoothed_tensor_765_index_0 * ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_72 + triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_72)[::,]) // (ninetoothed_ninetoothed_tensor_765_size_1 * (ninetoothed_ninetoothed_tensor_765_size_2 * ninetoothed_ninetoothed_tensor_765_size_3)) < ninetoothed_ninetoothed_tensor_765_size_0) & ((ninetoothed_tensor_765_index_0 * ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_72 + triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_72)[::,]) % (ninetoothed_ninetoothed_tensor_765_size_1 * (ninetoothed_ninetoothed_tensor_765_size_2 * ninetoothed_ninetoothed_tensor_765_size_3)) // (ninetoothed_ninetoothed_tensor_765_size_2 * ninetoothed_ninetoothed_tensor_765_size_3) < ninetoothed_ninetoothed_tensor_765_size_1) & ((ninetoothed_tensor_765_index_0 * ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_72 + triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_72)[::,]) % (ninetoothed_ninetoothed_tensor_765_size_1 * (ninetoothed_ninetoothed_tensor_765_size_2 * ninetoothed_ninetoothed_tensor_765_size_3)) % (ninetoothed_ninetoothed_tensor_765_size_2 * ninetoothed_ninetoothed_tensor_765_size_3) // ninetoothed_ninetoothed_tensor_765_size_3 < ninetoothed_ninetoothed_tensor_765_size_2) & ((ninetoothed_tensor_765_index_0 * ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_72 + triton.language.arange(0, ninetoothed_meta_prefix_ninetoothed_BLOCK_SIZE_72)[::,]) % (ninetoothed_ninetoothed_tensor_765_size_1 * (ninetoothed_ninetoothed_tensor_765_size_2 * ninetoothed_ninetoothed_tensor_765_size_3)) % (ninetoothed_ninetoothed_tensor_765_size_2 * ninetoothed_ninetoothed_tensor_765_size_3) % ninetoothed_ninetoothed_tensor_765_size_3 < ninetoothed_ninetoothed_tensor_765_size_3))
  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========== 660 passed, 16 skipped, 48 warnings in 970.00s (0:16:09) ===========

@voltjia voltjia merged commit 10c2cac into master Jan 14, 2026
4 checks passed
@voltjia voltjia deleted the fix-dtype-values-of-0-dim-tensors-in-premake-functions branch January 14, 2026 08:22
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