Skip to content

Commit

Permalink
[tuner]: format the code again
Browse files Browse the repository at this point in the history
Signed-off-by: Bangtian Liu <[email protected]>
  • Loading branch information
bangtianliu committed Dec 11, 2024
1 parent 7e923e1 commit daac653
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions tuner/tuner/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,30 +163,19 @@ def get_lowering_config(
return iree_gpu.LoweringConfigAttr.get(lowering_config_attrs)


# Generate a config dictionary in translation info
# Generate a config dictionary used in translation_info attribute.
def get_translation_info_config(
pipeline_options: iree_gpu.PipelineOptionsAttr, waves_per_eu: int
) -> ir.DictAttr:
"""
Example IR
translation_info = #iree_codegen.translation_info<
pipeline = LLVMGPUVectorDistribute
workgroup_size = [512, 1, 1]
subgroup_size = 64,
{gpu_pipeline_options = #iree_gpu.pipeline_options<>
pipeline = LLVMGPUVectorDistribute workgroup_size = [512, 1, 1] subgroup_size = 64,
{gpu_pipeline_options = #iree_gpu.pipeline_options<...>,
llvm_func_attrs = {"amdgpu-waves-per-eu" = "3"}
}
>
Example Usage:
pipeline_options = iree_gpu.PipelineOptionsAttr.get(...)
waves_per_eu = 3
config_dict = get_translation_info_config(
pipeline_options=pipeline_options,
waves_per_eu=waves_per_eu
)
this 'config_dict' is subsequently used afterward to generate the 'translation_info' in the above example IR."""
"""
waves_per_eu_str = str(waves_per_eu)

# Create the waves_per_eu dictionary attribute.
Expand Down

0 comments on commit daac653

Please sign in to comment.