Skip to content

Commit 5c26d81

Browse files
authored
Merge pull request #643 from mlcommons/main
restoring deleted files that broke various projects including our reproducibility initiatives at conferences such as ACM/IEEE MICRO 2023
2 parents 859970a + 76931d2 commit 5c26d81

File tree

107 files changed

+4228
-117
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+4228
-117
lines changed

.github/workflows/format.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,16 @@ jobs:
2626
python3 -m pip install autopep8
2727
for FILE in $(git diff --name-only ${{ github.event.before }} | grep -E '.*\.py$')
2828
do
29-
# Check if the file still exists in the working tree
30-
if [ -f "$FILE" ]; then
31-
autopep8 --in-place -a "$FILE"
32-
git add "$FILE"
33-
fi
29+
autopep8 --in-place -a $FILE
30+
git add $FILE
3431
done
3532
3633
- name: Format modified C++ files
3734
run: |
3835
for FILE in $(git diff --name-only ${{ github.event.before }} | grep -E '.*\.(cc|cpp|h|hpp)$')
3936
do
40-
# Check if the file still exists in the working tree
41-
if [ -f "$FILE" ]; then
42-
clang-format -i -style=file $FILE
43-
git add $FILE
44-
fi
37+
clang-format -i -style=file $FILE
38+
git add $FILE
4539
done
4640
4741
- name: Commit and create PR

README.md

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![License](https://img.shields.io/badge/License-Apache%202.0-green)](LICENSE.md)
44
[![Python Version](https://img.shields.io/badge/python-3+-blue.svg)](https://github.com/mlcommons/ck/tree/master/cm/cmind)
5-
[![Powered by CM](https://img.shields.io/badge/Powered_by-MLCommons%20CM-blue)](https://github.com/mlcommons/ck).
5+
[![Powered by CM](https://img.shields.io/badge/Powered_by-MLCommons%20CM-blue)](https://pypi.org/project/cmind).
66
[![Downloads](https://static.pepy.tech/badge/cm4mlops)](https://pepy.tech/project/cm4mlops)
77

88
[![CM script automation features test](https://github.com/mlcommons/cm4mlops/actions/workflows/test-cm-script-features.yml/badge.svg)](https://github.com/mlcommons/cm4mlops/actions/workflows/test-cm-script-features.yml)
@@ -13,16 +13,23 @@
1313
[![Test QAIC Software kit Compilation](https://github.com/mlcommons/cm4mlops/actions/workflows/test-qaic-software-kit.yml/badge.svg)](https://github.com/mlcommons/cm4mlops/actions/workflows/test-qaic-software-kit.yml)
1414

1515

16-
# Collective Mind (CM)
16+
# CM4MLOps repository
1717

18-
**Collective Mind (CM)** is a Python package with a CLI and API designed for creating and managing automations. Two key automations developed using CM are **Script** and **Cache**, which streamline machine learning (ML) workflows, including managing Docker runs. Both Script and Cache automations are part of the **cm4mlops** repository.
18+
**CM4MLOps** repository is powered by the [Collective Mind automation framework](https://github.com/mlcommons/ck/tree/master/cm),
19+
a [Python package](https://pypi.org/project/cmind/) with a CLI and API designed for creating and managing automations.
1920

20-
The CM scripts, also housed in the **cm4mlops** repository, consist of hundreds of modular Python-wrapped scripts accompanied by `yaml` metadata, enabling the creation of robust and flexible ML workflows.
21+
Two key automations developed using CM are **Script** and **Cache**, which streamline machine learning (ML) workflows,
22+
including managing Docker runs. Both Script and Cache automations are part of the **cm4mlops** repository.
23+
24+
The CM scripts, also housed in this repository, consist of hundreds of modular Python-wrapped scripts accompanied
25+
by `yaml` metadata, enabling the creation of robust and flexible ML workflows.
2126

2227
- **CM Scripts Documentation**: [https://docs.mlcommons.org/cm4mlops/](https://docs.mlcommons.org/cm4mlops/)
2328
- **CM CLI Documentation**: [https://docs.mlcommons.org/ck/specs/cm-cli/](https://docs.mlcommons.org/ck/specs/cm-cli/)
2429

25-
The `mlperf-branch` of the **cm4mlops** repository is dedicated to developments specific to MLPerf Inference. Please submit any pull requests (PRs) to this branch. For more information about using CM for MLPerf Inference, refer to the [MLPerf Inference Documentation](https://docs.mlcommons.org/inference/).
30+
The `mlperf-branch` of the **cm4mlops** repository is dedicated to developments specific to MLPerf Inference.
31+
Please submit any pull requests (PRs) to this branch. For more information about using CM for MLPerf Inference,
32+
refer to the [MLPerf Inference Documentation](https://docs.mlcommons.org/inference/).
2633

2734
## News
2835

@@ -34,22 +41,12 @@ The `mlperf-branch` of the **cm4mlops** repository is dedicated to developments
3441

3542
## CM concepts
3643

37-
Check our [ACM REP'23 keynote](https://doi.org/10.5281/zenodo.8105339).
38-
39-
## Authors
40-
41-
[Grigori Fursin](https://cKnowledge.org/gfursin) and [Arjun Suresh](https://www.linkedin.com/in/arjunsuresh)
42-
43-
## Major script developers
44-
45-
Arjun Suresh, Anandhu S, Grigori Fursin
44+
Check our [ACM REP'23 keynote](https://doi.org/10.5281/zenodo.8105339) and the [white paper](https://arxiv.org/abs/2406.16791).
4645

47-
## Funding
46+
## CM script developers
4847

49-
We thank [cKnowledge.org](https://cKnowledge.org), [cTuning foundation](https://cTuning.org)
50-
and [MLCommons](https://mlcommons.org) for sponsoring this project!
48+
Arjun Suresh, Anandhu Sooraj, Grigori Fursin
5149

52-
## Acknowledgments
50+
## Parent project
5351

54-
We thank all [volunteers, collaborators and contributors](https://github.com/mlcommons/cm4mlops/graphs/contributors)
55-
for their support, fruitful discussions, and useful feedback!
52+
Visit the [parent Collective Knowledge project](https://github.com/mlcommons/ck) for further details.

automation/script/README-extra.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
# CM "script" automation
44

5-
65
<details>
76
<summary>Click here to see the table of contents.</summary>
87

automation/script/module.py

Lines changed: 3 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,7 +1311,7 @@ def _run(self, i):
13111311

13121312
r = self._call_run_deps(prehook_deps, self.local_env_keys, local_env_keys_from_meta, env, state, const, const_state, add_deps_recursive,
13131313
recursion_spaces + extra_recursion_spaces,
1314-
remembered_selections, variation_tags_string, True, debug_script_tags, verbose, show_time, extra_recursion_spaces, run_state)
1314+
remembered_selections, variation_tags_string, found_cached, debug_script_tags, verbose, show_time, extra_recursion_spaces, run_state)
13151315
if r['return'] > 0:
13161316
return r
13171317

@@ -1372,7 +1372,7 @@ def _run(self, i):
13721372

13731373
r = self._call_run_deps(posthook_deps, self.local_env_keys, clean_env_keys_post_deps, env, state, const, const_state, add_deps_recursive,
13741374
recursion_spaces + extra_recursion_spaces,
1375-
remembered_selections, variation_tags_string, True, debug_script_tags, verbose, show_time, extra_recursion_spaces, run_state)
1375+
remembered_selections, variation_tags_string, found_cached, debug_script_tags, verbose, show_time, extra_recursion_spaces, run_state)
13761376
if r['return'] > 0:
13771377
return r
13781378

@@ -1383,7 +1383,7 @@ def _run(self, i):
13831383
# Check chain of post dependencies on other CM scripts
13841384
r = self._call_run_deps(post_deps, self.local_env_keys, clean_env_keys_post_deps, env, state, const, const_state, add_deps_recursive,
13851385
recursion_spaces + extra_recursion_spaces,
1386-
remembered_selections, variation_tags_string, True, debug_script_tags, verbose, show_time, extra_recursion_spaces, run_state)
1386+
remembered_selections, variation_tags_string, found_cached, debug_script_tags, verbose, show_time, extra_recursion_spaces, run_state)
13871387
if r['return'] > 0:
13881388
return r
13891389

@@ -1605,82 +1605,6 @@ def _run(self, i):
16051605
if r['return'] > 0:
16061606
return r
16071607

1608-
# Prepare common input to prepare and run script
1609-
run_script_input = {
1610-
'path': path,
1611-
'bat_ext': bat_ext,
1612-
'os_info': os_info,
1613-
'const': const,
1614-
'state': state,
1615-
'const_state': const_state,
1616-
'reuse_cached': reuse_cached,
1617-
'recursion': recursion,
1618-
'recursion_spaces': recursion_spaces,
1619-
'remembered_selections': remembered_selections,
1620-
'tmp_file_run_state': self.tmp_file_run_state,
1621-
'tmp_file_run_env': self.tmp_file_run_env,
1622-
'tmp_file_state': self.tmp_file_state,
1623-
'tmp_file_run': self.tmp_file_run,
1624-
'local_env_keys': self.local_env_keys,
1625-
'local_env_keys_from_meta': local_env_keys_from_meta,
1626-
'posthook_deps': posthook_deps,
1627-
'add_deps_recursive': add_deps_recursive,
1628-
'remembered_selections': remembered_selections,
1629-
'found_script_tags': found_script_tags,
1630-
'variation_tags_string': variation_tags_string,
1631-
'found_cached': False,
1632-
'debug_script_tags': debug_script_tags,
1633-
'verbose': verbose,
1634-
'meta': meta,
1635-
'self': self
1636-
}
1637-
1638-
# Check if pre-process and detect
1639-
if str(meta.get('predeps', 'True')).lower() not in ["0", "false", "no"] and os.path.isfile(
1640-
path_to_customize_py): # possible duplicate execution - needs fix
1641-
r = utils.load_python_module(
1642-
{'path': path, 'name': 'customize'})
1643-
if r['return'] > 0:
1644-
return r
1645-
1646-
customize_code = r['code']
1647-
1648-
customize_common_input = {
1649-
'input': i,
1650-
'automation': self,
1651-
'artifact': script_artifact,
1652-
'customize': script_artifact.meta.get('customize', {}),
1653-
'os_info': os_info,
1654-
'recursion_spaces': recursion_spaces,
1655-
'script_tags': script_tags,
1656-
'variation_tags': variation_tags
1657-
}
1658-
run_script_input['customize_code'] = customize_code
1659-
run_script_input['customize_common_input'] = customize_common_input
1660-
1661-
if repro_prefix != '':
1662-
run_script_input['repro_prefix'] = repro_prefix
1663-
if ignore_script_error:
1664-
run_script_input['ignore_script_error'] = True
1665-
if 'predeps' in dir(customize_code) and not fake_run:
1666-
1667-
logging.debug(
1668-
recursion_spaces +
1669-
' - Running preprocess ...')
1670-
1671-
run_script_input['run_state'] = run_state
1672-
1673-
ii = copy.deepcopy(customize_common_input)
1674-
ii['env'] = env
1675-
ii['state'] = state
1676-
ii['meta'] = meta
1677-
# may need to detect versions in multiple paths
1678-
ii['run_script_input'] = run_script_input
1679-
1680-
r = customize_code.predeps(ii)
1681-
if r['return'] > 0:
1682-
return r
1683-
16841608
# Check chain of dependencies on other CM scripts
16851609
if len(deps) > 0:
16861610
logging.debug(recursion_spaces +
@@ -1702,8 +1626,6 @@ def _run(self, i):
17021626
# Clean some output files
17031627
clean_tmp_files(clean_files, recursion_spaces)
17041628

1705-
# Repeated code
1706-
'''
17071629
# Prepare common input to prepare and run script
17081630
run_script_input = {
17091631
'path': path,
@@ -1733,7 +1655,6 @@ def _run(self, i):
17331655
'meta': meta,
17341656
'self': self
17351657
}
1736-
'''
17371658
if os.path.isfile(
17381659
path_to_customize_py): # possible duplicate execution - needs fix
17391660
r = utils.load_python_module(
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
### Challenge
2+
3+
Check past MLPerf inference results in [this MLCommons repository](https://github.com/mlcommons/cm4mlperf-results)
4+
and add derived metrics such as result/No of cores, power efficiency, device cost, operational costs, etc.
5+
6+
Add clock speed as a third dimension to graphs and improve Bar graph visualization.
7+
8+
Read [this documentation](https://github.com/mlcommons/ck/blob/master/docs/mlperf/inference/README.md)
9+
to run reference implementations of MLPerf inference benchmarks
10+
using the CM automation language and use them as a base for your developments.
11+
12+
Check [this ACM REP'23 keynote](https://doi.org/10.5281/zenodo.8105339) to learn more about our open-source project and long-term vision.
13+
14+
15+
### Prizes
16+
17+
* *All contributors will receive 1 point for submitting valid results for 1 complete benchmark on one system.*
18+
* *All contributors will receive an official MLCommons Collective Knowledge contributor award (see [this example](https://ctuning.org/awards/ck-award-202307-zhu.pdf)).*
19+
20+
21+
### Organizers
22+
23+
* [MLCommons](https://cKnowledge.org/mlcommons-taskforce)
24+
* [cTuning.org](https://www.linkedin.com/company/ctuning-foundation)
25+
* [cKnowledge.org](https://www.linkedin.com/company/cknowledge)
26+
27+
### Results
28+
29+
All accepted results will be publicly available in the CM format with derived metrics
30+
in this [MLCommons repository](https://github.com/mlcommons/cm4mlperf-results),
31+
in [MLCommons Collective Knowledge explorer](https://access.cknowledge.org/playground/?action=experiments)
32+
and at official [MLCommons website](https://mlcommons.org).
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"alias": "add-derived-metrics-to-mlperf-inference",
3+
"automation_alias": "challenge",
4+
"automation_uid": "3d84abd768f34e08",
5+
"date_close_extension": true,
6+
"date_open": "20240204",
7+
"points": 2,
8+
"tags": [
9+
"modularize",
10+
"optimize",
11+
"reproduce",
12+
"replicate",
13+
"benchmark",
14+
"automate",
15+
"derived-metrics",
16+
"mlperf-inference",
17+
"mlperf-inference-derived-metrics"
18+
],
19+
"title": "Add derived metrics to MLPerf inference benchmarks (power efficiency, results / No of cores, costs, etc)",
20+
"trophies": true,
21+
"uid": "c65b56d7770946ee"
22+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
20240220:
2+
* A prototype of a GUI to generate CM commands to run MLPerf inference benchmarks is ready: [link](https://access.cknowledge.org/playground/?action=howtorun&bench_uid=39877bb63fb54725)
3+
* A prototype of the infrastructure to reproduce MLPerf inference benchmark results is ready: [link](https://access.cknowledge.org/playground/?action=reproduce)
4+
* On-going efforts: https://github.com/mlcommons/ck/issues/1052
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
alias: automate-mlperf-inference-v3.1-and-v4.0-2024
2+
uid: f89f152fc2614240
3+
4+
automation_alias: challenge
5+
automation_uid: 3d84abd768f34e08
6+
7+
title: Add MLCommons CM workflows and unifed interface to automate MLPerf inference v3.1 and v4.0 benchmarks (Intel, Nvidia, Qualcomm, Arm64, TPU ...)
8+
9+
date_open: '20231215'
10+
date_close: '20240315'
11+
12+
hot: true
13+
14+
tags:
15+
- automate
16+
- mlperf-inference-v3.1-and-v4.0
17+
- 2024
18+
19+
experiments:
20+
- tags: mlperf-inference,v3.1
21+
- tags: mlperf-inference,v4.0
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
This challenge is under preparation. You can read about the motivation behind this challenge in our [invited talk at MLPerf-Bench @ HPCA'24](https://doi.org/10.5281/zenodo.10786893).
2+
3+
We plan to extend [MLCommons CM framework](https://github.com/mlcommons/ck)
4+
to automatically compose high-performance and cost-efficient AI systems
5+
based on MLPerf inference v4.0 results and [CM automation recipes](https://access.cknowledge.org/playground/?action=scripts).
6+
7+
* A prototype of a GUI to generate CM commands to run MLPerf inference benchmarks is ready: [link](https://access.cknowledge.org/playground/?action=howtorun&bench_uid=39877bb63fb54725)
8+
* A prototype of the infrastructure to reproduce MLPerf inference benchmark results is ready: [link](https://access.cknowledge.org/playground/?action=reproduce)
9+
10+
Contact the [MLCommons Task Force on Automation and Reproducibility](https://github.com/mlcommons/ck/blob/master/docs/taskforce.md) for more details.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
alias: compose-high-performance-and-cost-efficient-ai-systems-based-on-mlperf-4.0-2024
2+
uid: 7c983102d89e4869
3+
4+
automation_alias: challenge
5+
automation_uid: 3d84abd768f34e08
6+
7+
title: "Compose high-performance and cost-efficint AI systems using MLCommons' Collective Mind and MLPerf inference"
8+
9+
date_open: '20240101'
10+
11+
tags:
12+
- compose
13+
- ai
14+
- systems
15+
- mlperf-inference-v4.0
16+
- cm
17+
- mlcommons-cm
18+
- mlperf
19+
- v4.0
20+
- performance
21+
- energy
22+
- cost
23+
24+
experiments:
25+
- tags: mlperf-inference,v4.0

0 commit comments

Comments
 (0)