Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update device property names #1788

Merged
merged 1 commit into from
Aug 7, 2024
Merged
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 .github/pins/ipex.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e66d1aa4992a74d7d8eb1b2056af095851eb8b24
eaa07b1fe13a510ed1666f0e04fff438bdae356a
15 changes: 9 additions & 6 deletions third_party/intel/backend/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,11 @@ def parse_target(self, tgt_prop) -> dict:
dev_prop['max_num_sub_groups'] = tgt_prop.get('max_num_sub_groups', None)
dev_prop['sub_group_sizes'] = tgt_prop.get('sub_group_sizes', None)
dev_prop['has_fp64'] = tgt_prop.get('has_fp64', None)
dev_prop['support_cl_sg_matmul_acc'] = tgt_prop.get('support_cl_sg_matmul_acc', False)
dev_prop['support_cl_sg_matmul_acc_tf32'] = tgt_prop.get('support_cl_sg_matmul_acc_tf32', False)
dev_prop['support_cl_sg_2d_block_io'] = tgt_prop.get('support_cl_sg_2d_block_io', False)
dev_prop['has_subgroup_matrix_multiply_accumulate'] = tgt_prop.get('has_subgroup_matrix_multiply_accumulate',
False)
dev_prop['has_subgroup_matrix_multiply_accumulate_tensor_float32'] = tgt_prop.get(
'has_subgroup_matrix_multiply_accumulate_tensor_float32', False)
dev_prop['has_subgroup_2d_block_io'] = tgt_prop.get('has_subgroup_2d_block_io', False)
return dev_prop

def parse_options(self, opts) -> Any:
Expand Down Expand Up @@ -181,8 +183,9 @@ def make_ttgir(mod, metadata, opt, properties):
pm = ir.pass_manager(mod.context)
pm.enable_debug()
intel.passes.ttgpuir.add_triton_annotate_module(pm, min(properties["sub_group_sizes"]),
properties["support_cl_sg_2d_block_io"],
properties["support_cl_sg_matmul_acc"], opt.threads_per_warp)
properties["has_subgroup_2d_block_io"],
properties["has_subgroup_matrix_multiply_accumulate"],
opt.threads_per_warp)
pm.run(mod)

# Overwrite the threads_per_warp option with the module annotation.
Expand All @@ -192,7 +195,7 @@ def make_ttgir(mod, metadata, opt, properties):
pm = ir.pass_manager(mod.context)
pm.enable_debug()

if (properties["support_cl_sg_2d_block_io"] and properties["support_cl_sg_matmul_acc"]
if (properties["has_subgroup_2d_block_io"] and properties["has_subgroup_matrix_multiply_accumulate"]
and os.getenv("TRITON_INTEL_ADVANCED_PATH", "0") == "1"):
return XPUBackend.AdvancedPath.make_ttgir(mod, metadata, opt)

Expand Down