Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit eee627b

Browse files
committed
update
1 parent ff4ba4b commit eee627b

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

dl_bench/cli/launcher.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ def main():
194194
/ (10**12)
195195
)
196196
)
197+
print("FPS: {:.1f}".format(results.get("samples_per_s", 0)))
197198
pprint.pprint(report)
198199

199200
if args.output is not None:

dl_bench/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ def __init__(self, device, compiler, dtype="float32") -> None:
145145
self.dtype = str_to_dtype(dtype)
146146

147147
def to_device(self, x: torch.Tensor):
148+
x = x.contiguous(memory_format=torch.channels_last)
148149
if self.device_name in ("cuda", "xpu"):
149150
return x.to(self.device)
150151
elif self.device_name == "cpu":
@@ -230,6 +231,7 @@ def _compile_model(compile_mode: str, device, model: Module, sample_input, dtype
230231
# enable oneDNN graph fusion globally
231232
torch.jit.enable_onednn_fusion(True)
232233
compiled_model = torch.jit.trace(model, sample_input)
234+
233235
compiled_model = torch.jit.freeze(compiled_model)
234236
print("Compiled with torchscript onednn")
235237
elif compile_mode == "ipex":

scripts/margin.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ do
1818
for name in "${CNNS[@]}"
1919
do
2020
echo "Benchmark $name with BS=$BS and DTYPE=$DTYPE"
21-
numactl -N 1 benchmark-run -b cnn -p "name='${name}',batch_size='$BS'" --dtype "${DTYPE}" --benchmark_desc "${name}_bs$BS" --host "${HOST}" -c "${COMPILER}"
21+
numactl -N 1 benchmark-run -b cnn -p "name='${name}',batch_size='$BS'" --dtype "${DTYPE}" --benchmark_desc "${name}_bs$BS" --host "${HOST}" -c "${COMPILER}" --verbose --skip_verification
2222
done
2323
done
2424
done

0 commit comments

Comments
 (0)