Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup_ascend.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def _ensure_distributed_submodule():
if os.getenv("TRITON_BUILD_TD", "OFF").upper() not in ["ON", "1", "YES", "TRUE", "Y"]:
return
distributed_dir = _THIS_DIR / "third_party" / "ascend" / "Triton-distributed-ascend"
commit_id = "7786ae06d5cf16fc232d3ccfeb4a18f5d6a9e26e"
commit_id = "c3d161a6745c36c1dd46000d793768ba682d3e13"
if not distributed_dir.is_dir():
try:
_git_check_call_with_retry([
Expand Down
3 changes: 2 additions & 1 deletion third_party/ascend/backend/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def ttir_to_linalg(mod, metadata, opt, *, named_ops=False):
pm = ir.pass_manager(mod.context)
pm.enable_debug()
if distributed is not None:
distributed.ascend_passes.ttgpuir.add_convert_triton_distributed_to_hivm(pm)
distributed.ascend_passes.ttgpuir.add_convert_triton_distributed_to_hivm(pm, opt.core_ratio)

ascend.passes.ttir.add_triton_control_flow_opt(pm)
ascend.passes.ttir.add_triton_to_structure(pm, False, False)
Expand Down Expand Up @@ -1123,6 +1123,7 @@ class NPUOptions:
# Canonical modes: SIMD (D), SIMD with template-SIMT (P), and pure-SIMT
# (T). ``unstructured_in_simt`` is an equivalent P spelling.
compile_mode: str = "simd_simt_template"
core_ratio: str = ""
simt_stack_limit: int = None
# take effect on the reorder instruction pattern for SIMT. The pattern is disabled by default.
enable_simt_reorder_instruction: bool = False
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1158,6 +1158,10 @@ void TritonToLinalgPass::convertTTFunc(triton::FuncOp func, const bool existDot,
if (autoBlockifyAttr)
funcFunc->setAttr("auto_blockify_size", autoBlockifyAttr);

auto coreRatioAttr = func->getAttr("hivm.core_ratio");
if (coreRatioAttr)
funcFunc->setAttr("hivm.core_ratio", coreRatioAttr);

auto &funcFuncBody = funcFunc.getBody();
auto &funcBody = func.getBody();

Expand Down
Loading