Skip to content

Use acc dtype if out_dtype is not specified for tl.dot#10353

Merged
lezcano merged 3 commits into
triton-lang:mainfrom
mrTsjolder:main
May 27, 2026
Merged

Use acc dtype if out_dtype is not specified for tl.dot#10353
lezcano merged 3 commits into
triton-lang:mainfrom
mrTsjolder:main

Conversation

@mrTsjolder
Copy link
Copy Markdown
Contributor

This solves issue #10341

When specifying the acc argument of tl.dot with dtype tl.float16 without out_dtype=tl.float16 raises an AssertionError because the default for out_dtype is hard-coded to be tl.float32.
This PR changes the default out_dtype to be None to allow checking whether a value has been provided.
This again allows to use the dtype of acc as the default for out_dtype (if the acc argument is specified).

New contributor declaration

  • 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 FILL THIS IN.
  • 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.)

@mrTsjolder mrTsjolder requested a review from ptillet as a code owner May 21, 2026 21:07
Comment thread python/test/unit/language/test_core.py Outdated
@lezcano lezcano enabled auto-merge (squash) May 26, 2026 11:13
@lezcano lezcano merged commit 2c873e5 into triton-lang:main May 27, 2026
10 checks passed
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