Skip to content

[triton][beta] [Cherry-pick] '[TOOLS] Add hip support for link.py (#9084)' (#1331)#1331

Closed
agron911 wants to merge 3 commits into
facebookexperimental:mainfrom
agron911:export-D101982807
Closed

[triton][beta] [Cherry-pick] '[TOOLS] Add hip support for link.py (#9084)' (#1331)#1331
agron911 wants to merge 3 commits into
facebookexperimental:mainfrom
agron911:export-D101982807

Conversation

@agron911
Copy link
Copy Markdown
Contributor

@agron911 agron911 commented Apr 24, 2026

Summary:

This is a cherry-pick of an upstream PR: triton-lang/triton#9084

Upstream commit message:

> [TOOLS] Add hip support for link.py (#9084)

> * Use the same link cpp scr except hipStrean/CUstream etc.
> * Add a link.h prelude for AMD/Nvidia to adapt for the difference.
> * Enable test_aot.py for AMD.
> * Also rename AMD's compile.cpp to compile.c.

Do not remove the following line from this commit
Reactor Cherry-pick Revision: a0e769f

Diff Comparison: https://www.internalfb.com/intern/paste/P2283337631/

This diff was generated by running:

buck run fbcode//triton/tools/reactor:reactor -- cherrypick --num-commits 1 --no-submit

Reviewed By: sfzhu93

Differential Revision: D101982807

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 24, 2026
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented Apr 24, 2026

@agron911 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D101982807.

…hase 5 (facebookexperimental#1328)

Summary:
Pull Request resolved: facebookexperimental#1328

Disable budget-aware layout conversion elimination (Phase 5, smem_budget > 0) which crashes on Blackwell with `LLVM ERROR: Invalid out-dim size`. Root cause: `propagateSrcEncodingAndErase()` skips `scf::YieldOp` during type rewriting, leaving `scf::ForOp` results with stale encodings that corrupt LinearLayout dimensions.

Also fix `GenerateSubtiledRegion.cpp` build break (`CGAEncodingAttr::getDefault` -> `get1CTALayout`).

Reviewed By: sfzhu93

Differential Revision: D101982801
…bit dot precision to TF32x3 (#9080)' (facebookexperimental#1329)

Summary:
Pull Request resolved: facebookexperimental#1329

This is a cherry-pick of an upstream PR: triton-lang/triton#9080

Upstream commit message:
```
> [LANGUAGE] change default 32-bit dot precision to TF32x3 (#9080)
```

Conflict Resolution:
- File: python/triton/language/core.py
  Action: Removed conflict markers; kept the local "where the first dimension..." line and updated docstring to use tf32x3 instead of tf32. Did not add the upstream-introduced assert/if input_precision body code, since the local code path delegates input_precision processing to semantic.py.
  Reason: The local file was refactored to move input_precision default-setting logic from core.py.dot() to semantic.py. Adding the upstream body code here would duplicate logic and be unreachable.
- File: python/triton/language/semantic.py
  Action: Updated supports_tf32 check and default value from "tf32" to "tf32x3" in the input_precision branch of the dot() method.
  Reason: This file holds the actual default-precision logic locally; matching upstream's intent of changing the default precision from tf32 to tf32x3 requires updating it here.

Raw Conflicts: https://www.internalfb.com/intern/paste/P2283333395/
Resolution Diff: https://www.internalfb.com/intern/paste/P2283336430/
Diff Comparison: https://www.internalfb.com/intern/paste/P2283337118/

***Do not remove the following line from this commit***
Reactor Cherry-pick Revision: 63b387c

Reviewed By: sfzhu93

Differential Revision: D101982808
…084)' (facebookexperimental#1331)

Summary:
Pull Request resolved: facebookexperimental#1331

This is a cherry-pick of an upstream PR: triton-lang/triton#9084

Upstream commit message:
```
> [TOOLS] Add hip support for link.py (#9084)

> * Use the same link cpp scr except hipStrean/CUstream etc.
> * Add a link.h prelude for AMD/Nvidia to adapt for the difference.
> * Enable test_aot.py for AMD.
> * Also rename AMD's compile.cpp to compile.c.
```

***Do not remove the following line from this commit***
Reactor Cherry-pick Revision: a0e769f

Diff Comparison: https://www.internalfb.com/intern/paste/P2283337631/
 ---

This diff was generated by running:
```
buck run fbcode//triton/tools/reactor:reactor -- cherrypick --num-commits 1 --no-submit
```

Reviewed By: sfzhu93

Differential Revision: D101982807
agron911 added a commit to agron911/triton that referenced this pull request Apr 24, 2026
…084)' (facebookexperimental#1331)

Summary:
Pull Request resolved: facebookexperimental#1331

This is a cherry-pick of an upstream PR: triton-lang/triton#9084

Upstream commit message:
```
> [TOOLS] Add hip support for link.py (#9084)

> * Use the same link cpp scr except hipStrean/CUstream etc.
> * Add a link.h prelude for AMD/Nvidia to adapt for the difference.
> * Enable test_aot.py for AMD.
> * Also rename AMD's compile.cpp to compile.c.
```

***Do not remove the following line from this commit***
Reactor Cherry-pick Revision: a0e769f

Diff Comparison: https://www.internalfb.com/intern/paste/P2283337631/
 ---

This diff was generated by running:
```
buck run fbcode//triton/tools/reactor:reactor -- cherrypick --num-commits 1 --no-submit
```

Reviewed By: sfzhu93

Differential Revision: D101982807
@meta-codesync meta-codesync Bot changed the title [triton][beta] [Cherry-pick] '[TOOLS] Add hip support for link.py (#9084)' [triton][beta] [Cherry-pick] '[TOOLS] Add hip support for link.py (#9084)' (#1331) Apr 24, 2026
@agron911 agron911 force-pushed the export-D101982807 branch from 0f4698a to ac67053 Compare April 24, 2026 20:53
@meta-codesync meta-codesync Bot closed this in 674a42a Apr 24, 2026
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented Apr 24, 2026

This pull request has been merged in 674a42a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. fb-exported Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant