Replies: 2 comments 5 replies
-
Question 1: What about GEMMs? Re results table, SQL does have the ability to |
Beta Was this translation helpful? Give feedback.
-
It would be useful to have input_datatype, filter_datatype, and output_datatype in the Config table to support mixed types. Alternatively the data_type field specifies mixed types using the syntax type_type_type. |
Beta Was this translation helpful? Give feedback.
-
Introduction
The goal of #910 is to move our currently weekly tuning runs into the Tuna workflow. For a first stage, we want to be able to push at least a single config through the Tuna flow by hand. In other words, set up only for convolutions (so we can borrow from miopen support), take one of our existing configs and stuff it into the tables, and call a script that starts up a Tuna session and job, makes a tuning run, and returns results into the database.
Subsequent stages will develop support for gemm and fusion, automation through Jenkins, and transmission of the Tuna results to the MLIR performance runs, and verify that we're doing the same tuning with the same results as the old way.
Four database tables are needed for a minimal Tuna setup: config, session, job, and results.
Config table
The purpose of the config table is to record enough information to reproduce the command run in a tuning session. For a first cut, we'll use tuningRunner.py with the --config option to run the tuning loop on a single config. We may choose to trim the command down later, but tuningRunner.py is known to work.
The fields in the table will be
This schema is adapted from the miopen convolution config, but is not as general because we don't need that. We can revisit later if necessary.
Integer fields default to 0. String fields default to the empty string.
Session table
A session is described as "capturing anything that might affect tuning results." For us, that means arch (gfx908, etc), num_cu, rocm version, and mlir version. The mlir version is likely to be a git hash instead of a simple version. It also records some info about the context of the tuning run; at the moment those fields are reason, ticket, and docker.
The fields will be
Job table
The job table holds information necessary for running and monitoring a single tuning job. #976 mentions session through result in the list below. MIOpen's job table is more complex, and I've borrowed some fields from it that appear useful.
The fields will be
We'll have to double-check exactly what the job returns for the result and make sure we have the right type for that field. The result of a job and the exact format of the results table must be designed together.
Results table
The results table holds the tuning results in an arrangement that is amenable to looking up for performance runs. It has fields for session, config, and perf-config. In practice, we could look up the latest session with the desired arch, and use that session plus the config to look up the perf-config. Or we could convert the results table into a .tsv file, which is just arch, config, and perf-config.
It's likely to be useful to record all the tuning runs, to measure performance trends even in cases that don't win. For that, we could either make an auxiliary results table that saves everything, or we could put it all in a single table but have a "winner" flag. The former separates concerns better.
The fields of the results table will be
Beta Was this translation helpful? Give feedback.
All reactions