-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
261 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
Request For proposal | ||
==================== | ||
|
||
Preparing | ||
--------- | ||
|
||
1. Make sure milabench support the targetted hardware | ||
|
||
* NVIDIA | ||
* AMD | ||
|
||
2. Create a milabench configuration for your RFP | ||
Milabench comes with a wide variety of benchmarks. | ||
You should select and weight each benchmarks according to your | ||
target hardware. | ||
|
||
.. code-block:: yaml | ||
include: | ||
- base.yaml | ||
llama: | ||
enabled: true | ||
weight: 1.0 | ||
resnet50: | ||
enabled: true | ||
weight: 1.0 | ||
.. code-block:: yaml | ||
milabench resolve myconfig.yaml > RFP.yaml | ||
3. Prepare a container for your RFP | ||
|
||
|
||
.. code-block:: | ||
FROM milabench:cuda-v1.2.3 | ||
COPY RFP.yaml .../RFP.yaml | ||
ENV MILABENCH_CONFIG=".../RFP.yaml | ||
CMD milabench run | ||
4. Hot fixes | ||
|
||
* Disable a benchmarks | ||
* update container | ||
|
||
|
||
Vendor Instructions | ||
------------------- | ||
|
||
1. Vendor needs to create a system configuration that will | ||
specify the different compute nodes that will be used by milabench | ||
|
||
.. code-block:: | ||
system: | ||
sshkey: <privatekey> | ||
arch: cuda | ||
docker_image: ghcr.io/mila-iqia/milabench:cuda-nightly | ||
nodes: | ||
- name: node1 | ||
ip: 192.168.0.25 | ||
main: true | ||
port: 8123 | ||
user: <username> | ||
- name: node2 | ||
ip: 192.168.0.26 | ||
main: false | ||
user: <username> | ||
2. Run milabench | ||
|
||
.. code-block:: | ||
export MILABENCH_IMAGE=ghcr.io/mila-iqia/milabench:cuda-nightly | ||
# create ... | ||
mkdir -p configs | ||
mkdir -p results | ||
# put your vendor specific configuration | ||
vi configs/system.yaml | ||
# | ||
docker pull $MILABENCH_IMAGE | ||
# run milabench | ||
docker run -it --rm --gpus all --network host --ipc=host --privileged \ | ||
-v $SSH_KEY_FILE:/milabench/id_milabench \ | ||
-v $(pwd)/results:/milabench/envs/runs \ | ||
-v $(pwd)/configs:/milabench/envs/configs \ | ||
$MILABENCH_IMAGE \ | ||
milabench run --system /milabench/envs/configs/system.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
"""This file is generated, do not modify""" | ||
|
||
__tag__ = "v0.0.6-41-g932e30e" | ||
__commit__ = "932e30e79513fdd2448cedaf98a003bb4b5b9148" | ||
__date__ = "2024-01-17 14:33:14 -0500" | ||
__tag__ = "paice-v1" | ||
__commit__ = "0bf63487d2b99d46c2c205a65b9b5b6c6e298e43" | ||
__date__ = "2024-02-26 12:53:49 -0500" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
from dataclasses import dataclass | ||
|
||
from coleo import Option, tooled | ||
|
||
from milabench.config import _config_layers, merge | ||
|
||
|
||
# fmt: off | ||
@dataclass | ||
class Arguments: | ||
config : str | ||
# fmt: on | ||
|
||
|
||
@tooled | ||
def arguments(): | ||
# The name of the benchmark to develop | ||
config: str | ||
|
||
return Arguments(config) | ||
|
||
|
||
@tooled | ||
def cli_resolve(args=None): | ||
"""Generate a configuration""" | ||
|
||
if args is None: | ||
args = arguments() | ||
|
||
overrides = {} | ||
configs = [args.config, overrides] | ||
|
||
config = {} | ||
for layer in _config_layers(configs): | ||
config = merge(config, layer) | ||
|
||
wip_config = {} | ||
parents = [] | ||
|
||
# | ||
# Only keep enabled benchmarks | ||
# | ||
for benchname, benchconfig in config.items(): | ||
is_enabled = benchconfig.get("enabled", False) | ||
parent = benchconfig.get("inherits", None) | ||
|
||
if parent: | ||
parents.append(parent) | ||
|
||
if is_enabled: | ||
wip_config[benchname] = benchconfig | ||
|
||
# | ||
# Keep the parents as well | ||
# | ||
parents = set(parents) | ||
for parent in parents: | ||
wip_config[parent] = config[parent] | ||
|
||
# | ||
# Remove resolved fields | ||
# | ||
resolved = ["dirs", "config_file", "config_base"] | ||
for benchname, benchconfig in wip_config.items(): | ||
for field in resolved: | ||
benchconfig.pop(field, None) | ||
|
||
# | ||
# Finished | ||
# | ||
|
||
import yaml | ||
|
||
print(yaml.dump(wip_config)) | ||
|
||
|
||
if __name__ == "__main__": | ||
args = Arguments("/workspaces/milabench/config/standard.yaml") | ||
|
||
cli_resolve(args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.