Skip to content

Commit 9709f61

Browse files
TedThemistokleousTed Themistokleous
andauthored
Update resnet50 test (#398)
* Add additional flags for resnet50 int8 run - Allow for mixed precsion via fp16 flag -Allow for variable batch -Allow for variable calibrate data size * Fix datatype for os.environ vars --------- Co-authored-by: Ted Themistokleous <[email protected]>
1 parent 0096b6a commit 9709f61

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

quantization/image_classification/migraphx/resnet50/e2e_migraphx_resnet_example.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -398,9 +398,9 @@ def get_dataset_size(dataset_path, calibration_dataset_size):
398398
print("Write complete")
399399

400400
if flags.fp16:
401-
os.environ["ORT_MIGRAPHX_FP16_ENABLE"] = 1
401+
os.environ["ORT_MIGRAPHX_FP16_ENABLE"] = "1"
402402
else:
403-
os.environ["ORT_MIGRAPHX_FP16_ENABLE"] = 0
403+
os.environ["ORT_MIGRAPHX_FP16_ENABLE"] = "0"
404404

405405
# Run prediction in MIGraphX EP138G
406406
data_reader = ImageNetDataReader(ilsvrc2012_dataset_path,
@@ -422,5 +422,6 @@ def get_dataset_size(dataset_path, calibration_dataset_size):
422422
evaluator.evaluate(result)
423423

424424
#Set OS flags to off to ensure we don't interfere with other test runs
425-
os.environ["ORT_MIGRAPHX_FP16_ENABLE"] = 0
426-
os.environ["ORT_MIGRAPHX_INT8_ENABLE"] = 0
425+
426+
os.environ["ORT_MIGRAPHX_FP16_ENABLE"] = "0"
427+
os.environ["ORT_MIGRAPHX_INT8_ENABLE"] = "0"

0 commit comments

Comments
 (0)