Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit 534b78e

Browse files
authored
Generic Benchmark API (#352)
Generic benchmarking APIs for use with different frameworks. Includes: - BenchmarkResults class representing benchmark results, based on class in deepsparse - Abstract BenchmarkRunner, which would be implemented using different SparseML frameworks - Serialization via BenchmarkInfo - Ability to run benchmarks via CLI - Ability to run benchmarks via python API - Ability to reload a BenchmarkInfo json and create a new run with the same conditions
1 parent a574de1 commit 534b78e

File tree

6 files changed

+1705
-0
lines changed

6 files changed

+1705
-0
lines changed

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ def _setup_extras() -> Dict:
114114
def _setup_entry_points() -> Dict:
115115
return {
116116
"console_scripts": [
117+
"sparseml.benchmark=sparseml.benchmark.info:_main",
117118
"sparseml.framework=sparseml.framework.info:_main",
118119
"sparseml.sparsification=sparseml.sparsification.info:_main",
119120
]

src/sparseml/benchmark/__init__.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright (c) 2021 - present / Neuralmagic, Inc. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing,
10+
# software distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""
16+
Functionality related to running benchmarks across ML frameworks.
17+
"""
18+
19+
# flake8: noqa
20+
21+
from .info import *
22+
from .serialization import *

0 commit comments

Comments
 (0)