diff --git a/build_tools/ci/cpu_comparison/run.py b/build_tools/ci/cpu_comparison/run.py index 741b512b3..9c7e0f1fb 100755 --- a/build_tools/ci/cpu_comparison/run.py +++ b/build_tools/ci/cpu_comparison/run.py @@ -594,11 +594,6 @@ def run(self, config): raise NotImplementedError("Subclasses must implement this method") -# Run with: -# -# ./run.py output_dir ../../../../builds/iree-clang ../../../../peano_wheels/august_1_2024/llvm-aie/ --test-set ConvolutionTemplate -vv --xrt_lite_n_core_rows=4 --xrt_lite_n_core_cols=4 --additional-aie-compilation-flags="--mlir-print-ir-before-all --aie2xclbin-print-ir-before-all" > dump.mlir 2>&1 -# -# class ConvolutionTemplateSet(TestSet): def __init__(self): super().__init__("ConvolutionTemplate") @@ -606,22 +601,22 @@ def __init__(self): def run(self, config): testSet = [ - # { - # "conv_type": "conv_2d_nhwc_hwcf", - # "N": 2, - # "IH": 14, - # "IC": 32, - # "OC": 64, - # "KH": 3, - # "input_element_type": "i32", - # "output_element_type": "i32", - # }, { "conv_type": "conv_2d_nhwc_hwcf", - "N": 1, - "IH": 6, + "N": 2, + "IH": 14, + "IC": 32, + "OC": 64, + "KH": 3, + "input_element_type": "i32", + "output_element_type": "i32", + }, + { + "conv_type": "conv_2d_nhwc_hwcf", + "N": 2, + "IH": 14, "IC": 32, - "OC": 8, + "OC": 64, "KH": 3, "input_element_type": "bf16", "output_element_type": "f32", @@ -636,15 +631,15 @@ def run(self, config): "input_element_type": "i8", "output_element_type": "i32", }, - # { - # "conv_type": "depthwise_conv_2d_nhwc_hwc", - # "N": 1, - # "IH": 14, - # "IC": 64, - # "KH": 3, - # "input_element_type": "i32", - # "output_element_type": "i32", - # }, + { + "conv_type": "depthwise_conv_2d_nhwc_hwc", + "N": 1, + "IH": 14, + "IC": 64, + "KH": 3, + "input_element_type": "i32", + "output_element_type": "i32", + }, ] output_dir = config.output_dir @@ -652,7 +647,7 @@ def run(self, config): for testMap in testSet: convGen = ConvolutionMlirGenerator(**testMap) convGen.write_to_file(test_name) - n_conv_repeats = 1 + n_conv_repeats = 4 aie_vs_llvm_cpu( config, @@ -692,14 +687,6 @@ def run(self, config): test_files_dir = config.file_dir / "test_files" output_dir = config.output_dir - # Test(s) of the form matmul(A,B) where A:MxK, B:KxN - test_name = output_dir / "test_from_template.mlir" - template_name = matmul_template_dir / "matmul_MxK_KxN.mlir" - generate_matmul_test(test_name, template_name, 32, 32, 64, "bf16", "f32") - aie_vs_llvm_cpu(config, test_name) - - raise RuntimeError("Done!") - # Test(s) of the form matmul(A,B) + C where A:MxK, B:KxN, C:MxN test_name = output_dir / "test_from_template_full_bias.mlir" template_name = matmul_template_dir / "matmul_bias_MxK_KxN_MxN.mlir" @@ -727,6 +714,11 @@ def run(self, config): function_name="three_$mm$", ) + # Test(s) of the form matmul(A,B) where A:MxK, B:KxN + test_name = output_dir / "test_from_template.mlir" + template_name = matmul_template_dir / "matmul_MxK_KxN.mlir" + generate_matmul_test(test_name, template_name, 32, 32, 64, "bf16", "f32") + aie_vs_llvm_cpu(config, test_name) # Test(s) of the form matmul(A,B) + C where A:MxK, B:KxN, C:N test_name = output_dir / "test_from_template_bias_N.mlir"