Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fp8 convolution to the tuning runner #1738

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mlir/utils/performance/perfRunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
BENCHMARKING_METRICS_FILE_NAME = 'results.csv'
ROCMLIR_INPUT_METRICS_FILE_NAME = 'rocmlir_metrics.txt'
DIRECTIONS = ['-F 1', '-F 2', '-F 4']
DATA_TYPES = ['conv', 'convfp16', 'convint8']
DATA_TYPES = ['conv', 'convfp16', 'convfp8_fp8', 'convint8']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have fp8 configs that needs to be tuned inside rocMLIR ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will run on ResNet50 and Unet configs from the conv-configs file on weekly CI. Do you think we should expand that list?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am asking if they are listed in any of the config files ? For example, i do not see convfp8_fp8 here
https://github.com/ROCm/rocMLIR/blob/develop/mlir/utils/performance/sdxl-conv-configs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the sdxl-conv-config is an informational file, and I'm not sure why it has a predefined data type. Also, I haven't noticed it being used anywhere.
In the configs files we use, there isn't a predefined data type, and we leave for the tuningRuuner script to assign it.
For example:
-n 256 -c 1024 -H 14 -W 14 -k 2048 -y 1 -x 1 -p 0 -q 0 -u 2 -v 2 -l 1 -j 1 -g 1 -m conv -t 1
so, this PR enables generating fp8 tuning keys for all problem from conv-configs.

LAYOUTS = ['NHWC', 'NCHW']

DATA_TYPES_GEMM = ['f32', 'f16', 'i8', 'fp8']
Expand Down Expand Up @@ -273,7 +273,7 @@ def getConvConfigurations(fileName):
if len(line) == 0 or line[0] == '#':
continue
# Skip int8 non-fwd convolutions
if datatype == 'convint8' and direction != '-F 1':
if (datatype == 'convint8' or datatype == 'convfp8_fp8') and direction != '-F 1':
continue

# Skip datatype if already in
Expand Down
Loading