From f7d173275b74069ca4ba58bafa1a277e7385ebbf Mon Sep 17 00:00:00 2001 From: An Wang Date: Mon, 18 Nov 2019 13:16:03 -0800 Subject: [PATCH 1/4] add benchmark log format doc --- docs/dev/benchmark.rst | 112 +++++++++++++++++++++++++++++++++++++++++ docs/dev/index.rst | 1 + 2 files changed, 113 insertions(+) create mode 100644 docs/dev/benchmark.rst diff --git a/docs/dev/benchmark.rst b/docs/dev/benchmark.rst new file mode 100644 index 000000000000..d6eb6bf53c92 --- /dev/null +++ b/docs/dev/benchmark.rst @@ -0,0 +1,112 @@ +.. Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + +.. http://www.apache.org/licenses/LICENSE-2.0 + +.. Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +==================================== +**Benchmark Performance Log Format** +==================================== +This page details schema v0.1 for a unified benchmark log format. This schema will allow easier cross-references with other frameworks/runs, experiment reproduction, data for nightly perf regression, and the separation of logging/visualization efforts. + +******************* +Log Format Overview +******************* + ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| header | examples | category | notes/justification | ++=======================+============================================================================================================================================================+==============+==============================================================================+ +| timestamp | 1572282699.6 | metadata | indicates when this record is logged | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| schema\_version | 0.1 | metadata | ensure reproducibility as we iterate on this schema | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| metadata | { "docker\_tag":"gcr.io/.../0a680", ... } | metadata | ``docker_tag`` is required | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| workload | resnet-18 | workload | name of workload | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| workload\_args | {“input\_name”: "Input3", “input\_shape”: [list\_of\_shape], “data\_layout”: NHCW} | workload | | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| workload\_metadata | {"class": "vision","doc\_url": "``https://github.com/.../README.md``","opset": 7,"type": "body\_analysis","url": "``https://onnxzoo...ferplus.tar.gz``"} | workload | source of workload | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| engine | tvm / onnx-runtime | compiler | | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| engine\_version | 0.5 / 996cf30e8d54b4bf58f0c9950475f47bba7e2c7e | compiler | include either version or SHA, or both in the format "0.5:996cf3..." | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| engine\_config | {“llvm”: “llvm-8”, “nvcc”: 10.1, "accelerator": "MLAS"} | compiler | fields are optionally specified | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| compilation\_config | {"opt\_level": 3, "layer\_schedules": [...]} | compiler | optional | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| software\_config | {"os": "ubuntu:18.04","pip": { "docker": "4.1.0", "gitpython": "3.0.4", "numpy": "1.17.4", "onnx": "1.6.0"}} | backend | env dependency list | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| hardware\_config | "mbp13inch2019" | hardware | descriptor of target hardware environment, optionally json | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| runtime\_config | {“num\_cpu\_threads”: 3, “cudnn”: “cudnn-8”, “cuda\_driver”: “480.10.1”, “os”: linux} | hardware | backend runtime arguments, optionally specified | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| execution\_config | {“number”: 1, “repeat”: 10, “min\_repeat\_ms”, 0} | statistics | workload execution parameters | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| statistics | {“runtime\_ms\_mean”: 12,“runtime\_ms\_std”: 12} | statistics | all metrics, other optional fields ``binary_size``, ``compile_time``, etc. | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ + +Sample data: + +:: + + { + "compilation_config":{ + "relay_opt_lvl":3, + "tvm_target":"llvm" + }, + "engine":"tvm", + "engine_config":{ + "llvm":"llvm-8" + }, + "engine_version":"3486e2c2cf9d0c7c20853f3503528444ce824c1b", + "hardware_config":"mbp13inch2019", + "metadata":{ + "docker_tag":"gcr.io/octomizer/aquarium/bd666860528b06b09ceac8dd17f3f635" + }, + "schema_version":0.1, + "software_config":{ + "os":"ubuntu:18.04", + "pip":{ + "docker":"4.1.0", + "gitpython":"3.0.4", + "numpy":"1.17.4", + "onnx":"1.6.0" + } + }, + "statistics":{ + "compile_ms":2848.3831882476807, + "runtime_ms_mean":237.7542614444445, + "runtime_ms_std":2.8556173090926698 + }, + "timestamp":"20191114064203", + "workload":"vgg19", + "workload_args":{ + "input_name":"data_0", + "input_shape":[ + 1, + 3, + 224, + 224 + ] + }, + "workload_metadata":{ + "class":"vision", + "doc_url":"https://github.com/onnx/models/blob/master/vision/classification/vgg/vgg19/README.md", + "opset":3, + "type":"classification", + "url":"https://s3.amazonaws.com/download.onnx/models/opset_3/vgg19.tar.gz" + } + } diff --git a/docs/dev/index.rst b/docs/dev/index.rst index fad9852ede75..983d04f93fe3 100644 --- a/docs/dev/index.rst +++ b/docs/dev/index.rst @@ -36,3 +36,4 @@ In this part of documentation, we share the rationale for the specific choices m inferbound nnvm_json_spec nnvm_overview + benchmark From 4039e272fb884822e33d3a374ff02313cddcd326 Mon Sep 17 00:00:00 2001 From: An Wang Date: Thu, 21 Nov 2019 22:53:19 -0800 Subject: [PATCH 2/4] code review changes --- docs/dev/benchmark.rst | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/docs/dev/benchmark.rst b/docs/dev/benchmark.rst index d6eb6bf53c92..81fff64a77e0 100644 --- a/docs/dev/benchmark.rst +++ b/docs/dev/benchmark.rst @@ -15,14 +15,13 @@ specific language governing permissions and limitations under the License. -==================================== -**Benchmark Performance Log Format** -==================================== +******************************** +Benchmark Performance Log Format +******************************** This page details schema v0.1 for a unified benchmark log format. This schema will allow easier cross-references with other frameworks/runs, experiment reproduction, data for nightly perf regression, and the separation of logging/visualization efforts. -******************* Log Format Overview -******************* +~~~~~~~~~~~~~~~~~~~ +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ | header | examples | category | notes/justification | @@ -58,7 +57,12 @@ Log Format Overview | statistics | {“runtime\_ms\_mean”: 12,“runtime\_ms\_std”: 12} | statistics | all metrics, other optional fields ``binary_size``, ``compile_time``, etc. | +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -Sample data: + +Storage format +~~~~~~~~~~~~~~ +Currently we're prototyping benchmark data as JSON objects for extensibility and convenience, especially in early versions of the schema. However, as we scale up benchmark aggregation and stabilize parameters, we anticipate switching to a columnar format, such as Arrow or Parquet. + +Here is sample data encoded as JSON: :: @@ -74,7 +78,7 @@ Sample data: "engine_version":"3486e2c2cf9d0c7c20853f3503528444ce824c1b", "hardware_config":"mbp13inch2019", "metadata":{ - "docker_tag":"gcr.io/octomizer/aquarium/bd666860528b06b09ceac8dd17f3f635" + "docker_tag":"tvmai/ci-gpu:v0.53" }, "schema_version":0.1, "software_config":{ From 8d1d8a1dcf79d312980002feb01335041e143d50 Mon Sep 17 00:00:00 2001 From: An Wang Date: Fri, 22 Nov 2019 11:05:07 -0800 Subject: [PATCH 3/4] remove runtime_config, add md5 field --- docs/dev/benchmark.rst | 169 +++++++++++++++++++++-------------------- 1 file changed, 88 insertions(+), 81 deletions(-) diff --git a/docs/dev/benchmark.rst b/docs/dev/benchmark.rst index 81fff64a77e0..676749b220f1 100644 --- a/docs/dev/benchmark.rst +++ b/docs/dev/benchmark.rst @@ -23,39 +23,40 @@ This page details schema v0.1 for a unified benchmark log format. This schema wi Log Format Overview ~~~~~~~~~~~~~~~~~~~ -+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| header | examples | category | notes/justification | -+=======================+============================================================================================================================================================+==============+==============================================================================+ -| timestamp | 1572282699.6 | metadata | indicates when this record is logged | -+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| schema\_version | 0.1 | metadata | ensure reproducibility as we iterate on this schema | -+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| metadata | { "docker\_tag":"gcr.io/.../0a680", ... } | metadata | ``docker_tag`` is required | -+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| workload | resnet-18 | workload | name of workload | -+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| workload\_args | {“input\_name”: "Input3", “input\_shape”: [list\_of\_shape], “data\_layout”: NHCW} | workload | | -+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| workload\_metadata | {"class": "vision","doc\_url": "``https://github.com/.../README.md``","opset": 7,"type": "body\_analysis","url": "``https://onnxzoo...ferplus.tar.gz``"} | workload | source of workload | -+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| engine | tvm / onnx-runtime | compiler | | -+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| engine\_version | 0.5 / 996cf30e8d54b4bf58f0c9950475f47bba7e2c7e | compiler | include either version or SHA, or both in the format "0.5:996cf3..." | -+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| engine\_config | {“llvm”: “llvm-8”, “nvcc”: 10.1, "accelerator": "MLAS"} | compiler | fields are optionally specified | -+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| compilation\_config | {"opt\_level": 3, "layer\_schedules": [...]} | compiler | optional | -+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| software\_config | {"os": "ubuntu:18.04","pip": { "docker": "4.1.0", "gitpython": "3.0.4", "numpy": "1.17.4", "onnx": "1.6.0"}} | backend | env dependency list | -+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| hardware\_config | "mbp13inch2019" | hardware | descriptor of target hardware environment, optionally json | -+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| runtime\_config | {“num\_cpu\_threads”: 3, “cudnn”: “cudnn-8”, “cuda\_driver”: “480.10.1”, “os”: linux} | hardware | backend runtime arguments, optionally specified | -+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| execution\_config | {“number”: 1, “repeat”: 10, “min\_repeat\_ms”, 0} | statistics | workload execution parameters | -+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| statistics | {“runtime\_ms\_mean”: 12,“runtime\_ms\_std”: 12} | statistics | all metrics, other optional fields ``binary_size``, ``compile_time``, etc. | -+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +This schema primarily reflects coarse-grained grouping of parameters required for reproduction, so the naming/inclusion of fields within nested json objects may be unstable. We have included some suggestions and examples for propagation of these fields. + ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| header | examples | category | notes/justification | ++=======================+==============================================================================================================================================================================+==============+==============================================================================+ +| timestamp | 1572282699.6 | metadata | indicates when this record is logged | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| schema\_version | 0.1 | metadata | ensure reproducibility as we iterate on this schema | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| metadata | { "docker\_tag":"gcr.io/.../0a680", ... } | metadata | ``docker_tag`` is required | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| workload | resnet-18 | workload | name of workload | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| workload\_args | {“input\_name”: "Input3", “input\_shape”: [list\_of\_shape], “data\_layout”: NHCW} | workload | | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| workload\_metadata | {"class": "vision","doc\_url": "``https://github.com/.../README.md``", "opset": 7,"type": "body\_analysis","url": "``https://onnxzoo...ferplus.tar.gz``", "md5": "07fc7..."} | workload | source of workload | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| engine | tvm / onnx-runtime | compiler | | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| engine\_version | 0.5 / 996cf30e8d54b4bf58f0c9950475f47bba7e2c7e | compiler | include either version or SHA, or both in the format "0.5:996cf3..." | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| engine\_config | {“llvm”: “llvm-8”, “nvcc”: 10.1, "accelerator": "MLAS"} | compiler | fields are optionally specified | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| compilation\_config | {"opt\_level": 3, "layer\_schedules": [...]} | compiler | optional | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| software\_config | {"os": "ubuntu:18.04","pip": { "docker": "4.1.0", "gitpython": "3.0.4", "numpy": "1.17.4", "onnx": "1.6.0"}, “cudnn”: “cudnn-8”, "cuda_driver”: “480.10.1”} | backend | env dependency list | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| hardware\_config | "mbp13inch2019" | hardware | descriptor of target hardware environment, optionally json | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| execution\_config | {“number”: 1, “repeat”: 10, “min\_repeat\_ms”, 0} | statistics | workload execution parameters, optional | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| statistics | {“runtime\_ms\_mean”: 12,“runtime\_ms\_std”: 12} | statistics | all metrics, other optional fields ``binary_size``, ``compile_time``, etc. | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ + Storage format @@ -66,51 +67,57 @@ Here is sample data encoded as JSON: :: - { - "compilation_config":{ - "relay_opt_lvl":3, - "tvm_target":"llvm" - }, - "engine":"tvm", - "engine_config":{ - "llvm":"llvm-8" - }, - "engine_version":"3486e2c2cf9d0c7c20853f3503528444ce824c1b", - "hardware_config":"mbp13inch2019", - "metadata":{ - "docker_tag":"tvmai/ci-gpu:v0.53" - }, - "schema_version":0.1, - "software_config":{ - "os":"ubuntu:18.04", - "pip":{ - "docker":"4.1.0", - "gitpython":"3.0.4", - "numpy":"1.17.4", - "onnx":"1.6.0" - } - }, - "statistics":{ - "compile_ms":2848.3831882476807, - "runtime_ms_mean":237.7542614444445, - "runtime_ms_std":2.8556173090926698 - }, - "timestamp":"20191114064203", - "workload":"vgg19", - "workload_args":{ - "input_name":"data_0", - "input_shape":[ - 1, - 3, - 224, - 224 - ] - }, - "workload_metadata":{ - "class":"vision", - "doc_url":"https://github.com/onnx/models/blob/master/vision/classification/vgg/vgg19/README.md", - "opset":3, - "type":"classification", - "url":"https://s3.amazonaws.com/download.onnx/models/opset_3/vgg19.tar.gz" - } - } + { + "compilation_config":{ + "relay_opt_lvl":3, + "tvm_target":"llvm -mcpu=cascadelake" + }, + "engine":"tvm", + "engine_config":{ + "llvm":"llvm-8" + }, + "engine_version":"3486e2c2cf9d0c7c20853f3503528444ce824c1b", + "hardware_config":"c2-standard-16", + "metadata":{ + "docker_tag":"tvmai/ci-gpu:v0.53" + }, + "schema_version":0.1, + "software_config":{ + "os":"ubuntu:18.04", + "pip":{ + "docker":"4.1.0", + "gitpython":"3.0.4", + "numpy":"1.17.4", + "onnx":"1.6.0" + } + }, + "statistics":{ + "compile_ms":3030.268669128418, + "runtime_ms_mean":42.473589888888895, + "runtime_ms_std":2.184165809925635 + }, + "timestamp":"20191121223511", + "workload":"vgg19", + "workload_args":{ + "input_shape_dict":{ + "data_0":[ + 1, + 3, + 224, + 224 + ] + }, + "input_type_dict":{ + "data_0":"float32" + }, + "input_value_dict":{} + }, + "workload_metadata":{ + "class":"vision", + "doc_url":"https://github.com/onnx/models/blob/master/vision/classification/vgg/vgg19/README.md", + "md5":"07e9a6784c3d6d32e61e14ee8ceabfc7", + "opset":3, + "type":"classification", + "url":"https://s3.amazonaws.com/download.onnx/models/opset_3/vgg19.tar.gz" + } + } From 883bb56ecdf2bf51e71bf8d394bf23b285d25415 Mon Sep 17 00:00:00 2001 From: An Wang Date: Mon, 25 Nov 2019 12:23:53 -0800 Subject: [PATCH 4/4] schema edits --- docs/dev/benchmark.rst | 112 +++++++++++++++++++++++------------------ 1 file changed, 63 insertions(+), 49 deletions(-) diff --git a/docs/dev/benchmark.rst b/docs/dev/benchmark.rst index 676749b220f1..1b2507542e90 100644 --- a/docs/dev/benchmark.rst +++ b/docs/dev/benchmark.rst @@ -23,38 +23,48 @@ This page details schema v0.1 for a unified benchmark log format. This schema wi Log Format Overview ~~~~~~~~~~~~~~~~~~~ -This schema primarily reflects coarse-grained grouping of parameters required for reproduction, so the naming/inclusion of fields within nested json objects may be unstable. We have included some suggestions and examples for propagation of these fields. +For simplicity, we suggest prioritizing the fields `workload`, `engine`, `hardware` `runtime_ms_mean`, and `runtime_ms_std`. For finer-grained logging, one may additionally propagate the `*_config` fields. +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ | header | examples | category | notes/justification | +=======================+==============================================================================================================================================================================+==============+==============================================================================+ -| timestamp | 1572282699.6 | metadata | indicates when this record is logged | +| workload | resnet-18 | workload | name of workload | +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| schema\_version | 0.1 | metadata | ensure reproducibility as we iterate on this schema | +| engine | "tvm" / "onnxruntime" | compiler | | +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| metadata | { "docker\_tag":"gcr.io/.../0a680", ... } | metadata | ``docker_tag`` is required | +| hardware | "gcp-c2-standard-16" | hardware | descriptor of target hardware environment | +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| workload | resnet-18 | workload | name of workload | +| runtime_ms_mean | 12.452 | statistics | | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| runtime_ms_std | 5.3 | statistics | | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| timestamp | 1572282699.6 | metadata | indicates when this record is logged | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| schema\_version | "0.1" | metadata | ensure reproducibility as we iterate on this schema | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| metadata | { "docker\_tag":"gcr.io/.../0a680", ... } | metadata | ``docker_tag`` is optional | +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ | workload\_args | {“input\_name”: "Input3", “input\_shape”: [list\_of\_shape], “data\_layout”: NHCW} | workload | | +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ | workload\_metadata | {"class": "vision","doc\_url": "``https://github.com/.../README.md``", "opset": 7,"type": "body\_analysis","url": "``https://onnxzoo...ferplus.tar.gz``", "md5": "07fc7..."} | workload | source of workload | +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| engine | tvm / onnx-runtime | compiler | | +| engine\_version | "1.0.5" | compiler | use semvar format | +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| engine\_version | 0.5 / 996cf30e8d54b4bf58f0c9950475f47bba7e2c7e | compiler | include either version or SHA, or both in the format "0.5:996cf3..." | +| engine\_config | {“llvm”: “llvm-8”, “nvcc”: 10.1, "accelerator": "MLAS", "relay_opt_level": 3, "tvm_target":"llvm -mcpu=cascadelake"} | compiler | fields are optionally specified | +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| engine\_config | {“llvm”: “llvm-8”, “nvcc”: 10.1, "accelerator": "MLAS"} | compiler | fields are optionally specified | -+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| compilation\_config | {"opt\_level": 3, "layer\_schedules": [...]} | compiler | optional | +| compilation\_config | {"opt_level": 3, "layer_schedules":[]/ } | compiler | fields are optionally specified | +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ | software\_config | {"os": "ubuntu:18.04","pip": { "docker": "4.1.0", "gitpython": "3.0.4", "numpy": "1.17.4", "onnx": "1.6.0"}, “cudnn”: “cudnn-8”, "cuda_driver”: “480.10.1”} | backend | env dependency list | +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| hardware\_config | "mbp13inch2019" | hardware | descriptor of target hardware environment, optionally json | +| runtime\_config | {"num_cpu_threads": 3} | backend | info on non-hardware, non-software metadata | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| hardware\_config | {"cpu_count": 16, "cloud_machine_type":"c2-standard-16", "memory_GB":64} | hardware | json descriptor of target hardware environment | +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| execution\_config | {“number”: 1, “repeat”: 10, “min\_repeat\_ms”, 0} | statistics | workload execution parameters, optional | +| execution\_config | {“number”: 1, “repeat”: 10, “min\_repeat\_ms”, 0} | statistics | workload execution parameters | +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ -| statistics | {“runtime\_ms\_mean”: 12,“runtime\_ms\_std”: 12} | statistics | all metrics, other optional fields ``binary_size``, ``compile_time``, etc. | +| metrics | {“accuracy”: 48.5,“compilation_ms_mean”: 12} | statistics | other metrics | ++-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ +| runtime_raw | [{"runtime_ms": 12, ...}, {"runtime_ms":13,...},...] | statistics | optional raw metrics array | +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+------------------------------------------------------------------------------+ @@ -68,56 +78,60 @@ Here is sample data encoded as JSON: :: { - "compilation_config":{ - "relay_opt_lvl":3, - "tvm_target":"llvm -mcpu=cascadelake" - }, + "workload":"arcface_resnet100", "engine":"tvm", - "engine_config":{ - "llvm":"llvm-8" - }, - "engine_version":"3486e2c2cf9d0c7c20853f3503528444ce824c1b", - "hardware_config":"c2-standard-16", + "hardware":"gcp-c2-standard-16", + "runtime_ms_mean":109.43004820081924, + "runtime_ms_std":0.09078385126800587, + "timestamp":"20191123003411", + "schema_version":"0.1", "metadata":{ "docker_tag":"tvmai/ci-gpu:v0.53" }, - "schema_version":0.1, - "software_config":{ - "os":"ubuntu:18.04", - "pip":{ - "docker":"4.1.0", - "gitpython":"3.0.4", - "numpy":"1.17.4", - "onnx":"1.6.0" - } - }, - "statistics":{ - "compile_ms":3030.268669128418, - "runtime_ms_mean":42.473589888888895, - "runtime_ms_std":2.184165809925635 - }, - "timestamp":"20191121223511", - "workload":"vgg19", "workload_args":{ "input_shape_dict":{ - "data_0":[ + "data":[ 1, 3, - 224, - 224 + 112, + 112 ] }, "input_type_dict":{ - "data_0":"float32" + "data":"float32" }, "input_value_dict":{} }, "workload_metadata":{ "class":"vision", - "doc_url":"https://github.com/onnx/models/blob/master/vision/classification/vgg/vgg19/README.md", - "md5":"07e9a6784c3d6d32e61e14ee8ceabfc7", - "opset":3, - "type":"classification", - "url":"https://s3.amazonaws.com/download.onnx/models/opset_3/vgg19.tar.gz" - } + "doc_url":"https://github.com/onnx/models/blob/master/vision/body_analysis/arcface/README.md", + "md5":"66074b860f905295aab5a842be57f37d", + "opset":8, + "type":"body_analysis", + "url":"https://s3.amazonaws.com/onnx-model-zoo/arcface/resnet100/resnet100.tar.gz" + }, + "engine_version":"1.0.0", + "engine_config":{}, + "compilation_config":{ + "relay_opt_level": 3 + }, + "software_config":{ + "os":"ubuntu:18.04", + "pip":{ + "docker":"4.1.0", + "gitpython":"3.0.4", + "numpy":"1.17.4", + "onnx":"1.6.0" + } + }, + "runtime_config":{}, + "hardware_config":{ + "cloud_machine_type":"c2-standard-16", + "cloud_provider":"GCP", + "cpu_count":16, + "cpu_platform":"Intel Cascade Lake", + "memory_GB":64 + }, + "execution_config":{}, + "metrics":{} }