Skip to content

Commit

Permalink
replacing jotaibench's version v1 to v0
Browse files Browse the repository at this point in the history
  • Loading branch information
canesche committed Aug 23, 2022
1 parent 8299a58 commit f82089f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions compiler_gym/envs/llvm/datasets/jotaibench.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ def __init__(
manifest_url_, manifest_sha256_ = {
"darwin": (
"https://github.com/lac-dcc/jotai-benchmarks/blob/main/benchmarks/jotaibench.bz2?raw=true",
"202d14b0f3f78210c7472b7d4ef7c33d828174c30a3bced6950fc1ca88773983",
"b5a51af3d4e2f77a66001635ec64ed321e0ece19873c4a888040859af7556401",
),
"linux": (
"https://github.com/lac-dcc/jotai-benchmarks/blob/main/benchmarks/jotaibench.bz2?raw=true",
"202d14b0f3f78210c7472b7d4ef7c33d828174c30a3bced6950fc1ca88773983",
"b5a51af3d4e2f77a66001635ec64ed321e0ece19873c4a888040859af7556401",
),
}[sys.platform]
super().__init__(
name=name or "benchmark://jotaibench-v1",
name=name or "benchmark://jotaibench-v0",
description="Compile-only C/C++ functions extracted from GitHub",
references={
"Paper": "https://homepages.dcc.ufmg.br/~fernando/publications/papers/FaustinoCGO21.pdf",
Expand All @@ -77,8 +77,8 @@ def __init__(
tar_urls=[
"https://github.com/lac-dcc/jotai-benchmarks/blob/main/benchmarks/jotaibench.bz2?raw=true"
],
tar_sha256="202d14b0f3f78210c7472b7d4ef7c33d828174c30a3bced6950fc1ca88773983",
strip_prefix="jotaibench-v1",
tar_sha256="b5a51af3d4e2f77a66001635ec64ed321e0ece19873c4a888040859af7556401",
strip_prefix="jotaibench-v0",
tar_compression="bz2",
benchmark_file_suffix=".c",
sort_order=sort_order,
Expand Down Expand Up @@ -142,7 +142,7 @@ def __init__(
site_data_base: Path,
):
super().__init__(
name="benchmark://jotai-runnable-v1",
name="benchmark://jotai-runnable-v0",
description="Runnable C/C++ functions extracted from GitHub",
references={
"Paper": "https://homepages.dcc.ufmg.br/~fernando/publications/papers/FaustinoCGO21.pdf",
Expand All @@ -153,8 +153,8 @@ def __init__(
tar_urls=[
"https://github.com/lac-dcc/jotai-benchmarks/blob/main/benchmarks/jotaibench.bz2?raw=true"
],
tar_sha256="202d14b0f3f78210c7472b7d4ef7c33d828174c30a3bced6950fc1ca88773983",
strip_prefix="jotaibench-v1",
tar_sha256="b5a51af3d4e2f77a66001635ec64ed321e0ece19873c4a888040859af7556401",
strip_prefix="jotaibench-v0",
tar_compression="bz2",
benchmark_file_suffix=".c",
)
Expand Down
10 changes: 5 additions & 5 deletions tests/llvm/datasets/jotaibench_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
@pytest.fixture(scope="module")
def jotaibench_dataset() -> JotaiBenchDataset:
with gym.make("llvm-v0") as env:
ds = env.datasets["jotaibench-v1"]
ds = env.datasets["jotaibench-v0"]
yield ds


Expand All @@ -38,15 +38,15 @@ def test_missing_benchmark_name(jotaibench_dataset: JotaiBenchDataset, mocker):
mocker.patch.object(jotaibench_dataset, "install")

with pytest.raises(
LookupError, match=r"^No benchmark specified: benchmark://jotaibench-v1$"
LookupError, match=r"^No benchmark specified: benchmark://jotaibench-v0$"
):
jotaibench_dataset.benchmark("benchmark://jotaibench-v1")
jotaibench_dataset.benchmark("benchmark://jotaibench-v0")
jotaibench_dataset.install.assert_called_once()

with pytest.raises(
LookupError, match=r"^No benchmark specified: benchmark://jotaibench-v1/$"
LookupError, match=r"^No benchmark specified: benchmark://jotaibench-v0/$"
):
jotaibench_dataset.benchmark("benchmark://jotaibench-v1/")
jotaibench_dataset.benchmark("benchmark://jotaibench-v0/")
assert jotaibench_dataset.install.call_count == 2


Expand Down

0 comments on commit f82089f

Please sign in to comment.