Skip to content

Commit a526f7d

Browse files
authored
Fix dispatch saving code after 749a2c2 (huggingface#483)
In 749a2c2 iree_device_map and iree_target_map have been made functions but not all of the uses were updated.
1 parent 749a2c2 commit a526f7d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

shark/iree_utils/compile_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def compile_benchmark_dirs(bench_dir, device, dispatch_benchmarks):
119119
dispatch_file.close()
120120

121121
flatbuffer_blob = ireec.compile_str(
122-
module, target_backends=[IREE_TARGET_MAP[device]]
122+
module, target_backends=[iree_target_map(device)]
123123
)
124124

125125
vmfb_file = open(
@@ -128,7 +128,7 @@ def compile_benchmark_dirs(bench_dir, device, dispatch_benchmarks):
128128
vmfb_file.write(flatbuffer_blob)
129129
vmfb_file.close()
130130

131-
config = ireert.Config(IREE_DEVICE_MAP[device])
131+
config = ireert.Config(iree_device_map(device))
132132
vm_module = ireert.VmModule.from_flatbuffer(
133133
config.vm_instance, flatbuffer_blob
134134
)
@@ -177,7 +177,7 @@ def compile_benchmark_dirs(bench_dir, device, dispatch_benchmarks):
177177

178178
flatbuffer_blob = ireec.compile_str(
179179
module,
180-
target_backends=[IREE_TARGET_MAP[device]],
180+
target_backends=[iree_target_map(device)],
181181
extra_args=["--compile-mode=hal-executable"],
182182
)
183183

0 commit comments

Comments
 (0)