Skip to content

Commit

Permalink
Merge pull request #511 from ChrisCummins/mibench-v1
Browse files Browse the repository at this point in the history
[llvm] Update mibench to v1.
  • Loading branch information
ChrisCummins authored Dec 10, 2021
2 parents 1596776 + 5aa5218 commit 187c470
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
26 changes: 26 additions & 0 deletions compiler_gym/envs/llvm/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,30 @@ def __init__(self, site_data_base: Path, sort_order: int = 0):


class MibenchDataset(TarDatasetWithManifest):
def __init__(self, site_data_base: Path, sort_order: int = 0):
super().__init__(
name="benchmark://mibench-v1",
tar_urls=[
"https://dl.fbaipublicfiles.com/compiler_gym/llvm_bitcodes-10.0.0-mibench-v1.tar.bz2"
],
tar_sha256="795b80d3198bc96e394823a4cb294d256845beffccce52fea0e3446395212bb5",
manifest_urls=[
"https://dl.fbaipublicfiles.com/compiler_gym/llvm_bitcodes-10.0.0-mibench-v0-manifest.bz2"
],
manifest_sha256="8ed985d685b48f444a3312cd84ccc5debda4a839850e442a3cdc93910ba0dc5f",
references={
"Paper": "http://vhosts.eecs.umich.edu/mibench/Publications/MiBench.pdf"
},
license="BSD 3-Clause",
strip_prefix="mibench-v1",
description="C benchmarks",
benchmark_file_suffix=".bc",
site_data_base=site_data_base,
sort_order=sort_order,
)


class MibenchV0Dataset(TarDatasetWithManifest):
def __init__(self, site_data_base: Path, sort_order: int = 0):
super().__init__(
name="benchmark://mibench-v0",
Expand All @@ -129,6 +153,7 @@ def __init__(self, site_data_base: Path, sort_order: int = 0):
benchmark_file_suffix=".bc",
site_data_base=site_data_base,
sort_order=sort_order,
deprecated="Please use mibench-v1",
)


Expand Down Expand Up @@ -259,6 +284,7 @@ def get_llvm_datasets(site_data_base: Optional[Path] = None) -> Iterable[Dataset
yield LinuxDataset(site_data_base=site_data_base, sort_order=0)
yield LlvmStressDataset(site_data_base=site_data_base, sort_order=0)
yield MibenchDataset(site_data_base=site_data_base, sort_order=0)
yield MibenchV0Dataset(site_data_base=site_data_base, sort_order=100)
yield NPBDataset(site_data_base=site_data_base, sort_order=0)
yield OpenCVDataset(site_data_base=site_data_base, sort_order=0)
yield POJ104Dataset(site_data_base=site_data_base, sort_order=0)
Expand Down
2 changes: 1 addition & 1 deletion docs/source/llvm/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ We provide several datasets of open-source LLVM-IR benchmarks for use:
+----------------------------+--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+
| benchmark://linux-v0 | 13,894 | Compile-only object files from C Linux kernel [`Homepage <https://www.linux.org/>`__] | No |
+----------------------------+--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+
| benchmark://mibench-v0 | 40 | C benchmarks [`Paper <http://vhosts.eecs.umich.edu/mibench/Publications/MiBench.pdf>`__] | No |
| benchmark://mibench-v1 | 40 | C benchmarks [`Paper <http://vhosts.eecs.umich.edu/mibench/Publications/MiBench.pdf>`__] | No |
+----------------------------+--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+
| benchmark://npb-v0 | 122 | NASA Parallel Benchmarks [`Paper <http://optout.csc.ncsu.edu/~mueller/codeopt/codeopt05/projects/www4.ncsu.edu/~pgauria/csc791a/papers/NAS-95-020.pdf>`__] | No |
+----------------------------+--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+
Expand Down
2 changes: 1 addition & 1 deletion examples/llvm_rl/config/testing/all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ benchmarks:
max_benchmarks: 50
- dataset: generator://llvm-stress-v0
max_benchmarks: 50
- dataset: benchmark://mibench-v0
- dataset: benchmark://mibench-v1
max_benchmarks: 50
- dataset: benchmark://npb-v0
max_benchmarks: 50
Expand Down
2 changes: 1 addition & 1 deletion tests/llvm/datasets/llvm_datasets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def test_default_dataset_list():
"benchmark://clgen-v0",
"benchmark://github-v0",
"benchmark://linux-v0",
"benchmark://mibench-v0",
"benchmark://mibench-v1",
"benchmark://npb-v0",
"benchmark://opencv-v0",
"benchmark://poj104-v1",
Expand Down

0 comments on commit 187c470

Please sign in to comment.