Skip to content

Commit

Permalink
Update device property names
Browse files Browse the repository at this point in the history
  • Loading branch information
ZzEeKkAa committed Aug 5, 2024
1 parent a71e7be commit 7255227
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions third_party/intel/backend/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,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 @@ -178,8 +180,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 @@ -189,7 +192,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

0 comments on commit 7255227

Please sign in to comment.