Skip to content

Conversation

@Mwsxy
Copy link
Contributor

@Mwsxy Mwsxy commented Aug 19, 2024

  1. Fixed the errors in the formulas in the comments.
  2. When assert is enabled in DEBUG mode, using the list type will report an error. Additionally, the Tensor returned by the internal interface can ensure that the shape is a list and does not require checking.

The core Triton is a small number of people, and we receive many PRs (thank
you!). To help us review your code more quickly, if you are a new
contributor (less than 3 PRs merged) we ask that you complete the following
tasks and include the filled-out checklist in your PR description.

Complete the following tasks before sending your PR, and replace [ ] with
[x] to indicate you have done them.

  • I am not making a trivial change, such as fixing a typo in a comment.

  • I have written a PR description following these
    rules.

  • I have run pre-commit run --from-ref origin/main --to-ref HEAD.

  • Select one of the following.

    • I have added tests.
      • /test for lit tests
      • /unittest for C++ tests
      • /python/test for end-to-end tests
    • This PR does not need a test because it does not take any effect to working code.
  • Select one of the following.

    • I have not added any lit tests.
    • The lit tests I have added follow these best practices,
      including the "tests should be minimal" section. (Usually running Python code
      and using the instructions it generates is not minimal.)

@Mwsxy Mwsxy requested a review from ptillet as a code owner August 19, 2024 06:18
@Jokeren
Copy link
Contributor

Jokeren commented Aug 19, 2024

When assert is enabled in DEBUG mode

What you mean DEBUG mode?

@Mwsxy
Copy link
Contributor Author

Mwsxy commented Aug 21, 2024

When assert is enabled in DEBUG mode

What you mean DEBUG mode?

In the previous version, I tested that TRITON_DEBUG=1 would cause an assert error in tl.interleave, but I just tested in the latest 3.0 version and this problem no longer exists.

@Jokeren Jokeren changed the title fix: interleave does not need to check shape [FRONTEND] interleave does not need to check shape Aug 23, 2024
@Jokeren Jokeren enabled auto-merge (squash) August 23, 2024 13:27
@Jokeren Jokeren merged commit 54801fa into triton-lang:main Aug 23, 2024
"""
c = core.join(a, b)

assert isinstance(c.shape, list)
Copy link
Collaborator

Choose a reason for hiding this comment

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

why are we removing this assert?

Copy link
Contributor

Choose a reason for hiding this comment

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

The join method always returns a tensor with a shape of list type

Jokeren pushed a commit that referenced this pull request Aug 24, 2024
1. Fixed the errors in the formulas in the comments.
2. When assert is enabled in DEBUG mode, using the list type will report
an error. Additionally, the Tensor returned by the internal interface
can ensure that the shape is a list and does not require checking.


The core Triton is a small number of people, and we receive many PRs
(thank
you!).  To help us review your code more quickly, **if you are a new
contributor (less than 3 PRs merged) we ask that you complete the
following
tasks and include the filled-out checklist in your PR description.**

Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.

- [x] I am not making a trivial change, such as fixing a typo in a
comment.

- [x] I have written a PR description following these
  [rules](https://cbea.ms/git-commit/#why-not-how).

- [x] I have run `pre-commit run --from-ref origin/main --to-ref HEAD`.

- Select one of the following.
  - [ ] I have added tests.
    - `/test` for `lit` tests
    - `/unittest` for C++ tests
    - `/python/test` for end-to-end tests
- [x] This PR does not need a test because it does not take any effect
to working code.

- Select one of the following.
  - [x] I have not added any `lit` tests.
- [ ] The `lit` tests I have added follow these [best
practices](https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices),
including the "tests should be minimal" section. (Usually running Python
code
    and using the instructions it generates is not minimal.)

Co-authored-by: 谢双镱 <[email protected]>
bertmaher pushed a commit to bertmaher/triton that referenced this pull request Dec 10, 2024
1. Fixed the errors in the formulas in the comments.
2. When assert is enabled in DEBUG mode, using the list type will report
an error. Additionally, the Tensor returned by the internal interface
can ensure that the shape is a list and does not require checking.


The core Triton is a small number of people, and we receive many PRs
(thank
you!).  To help us review your code more quickly, **if you are a new
contributor (less than 3 PRs merged) we ask that you complete the
following
tasks and include the filled-out checklist in your PR description.**

Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.

- [x] I am not making a trivial change, such as fixing a typo in a
comment.

- [x] I have written a PR description following these
  [rules](https://cbea.ms/git-commit/#why-not-how).

- [x] I have run `pre-commit run --from-ref origin/main --to-ref HEAD`.

- Select one of the following.
  - [ ] I have added tests.
    - `/test` for `lit` tests
    - `/unittest` for C++ tests
    - `/python/test` for end-to-end tests
- [x] This PR does not need a test because it does not take any effect
to working code.

- Select one of the following.
  - [x] I have not added any `lit` tests.
- [ ] The `lit` tests I have added follow these [best
practices](https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices),
including the "tests should be minimal" section. (Usually running Python
code
    and using the instructions it generates is not minimal.)

Co-authored-by: 谢双镱 <[email protected]>
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.

3 participants