Skip to content

Commit

Permalink
[datasets] Add a new Benchmark class.
Browse files Browse the repository at this point in the history
A benchmark represents that particular program that is being compiled.

Issue facebookresearch#45.
  • Loading branch information
ChrisCummins authored and bwasti committed Aug 3, 2021
1 parent b7388fe commit d373b67
Show file tree
Hide file tree
Showing 5 changed files with 697 additions and 3 deletions.
10 changes: 8 additions & 2 deletions compiler_gym/datasets/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ load("@rules_python//python:defs.bzl", "py_library")

py_library(
name = "datasets",
srcs = ["__init__.py"],
srcs = [
"__init__.py",
"benchmark.py",
"dataset.py",
],
visibility = ["//visibility:public"],
deps = [
":dataset",
"//compiler_gym:validation_result",
"//compiler_gym/service/proto",
"//compiler_gym/util",
],
)

Expand Down
16 changes: 15 additions & 1 deletion compiler_gym/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""Manage datasets of benchmarks."""
from compiler_gym.datasets.benchmark import (
Benchmark,
BenchmarkInitError,
BenchmarkSource,
)
from compiler_gym.datasets.dataset import (
LegacyDataset,
activate,
Expand All @@ -11,4 +16,13 @@
require,
)

__all__ = ["LegacyDataset", "require", "activate", "deactivate", "delete"]
__all__ = [
"activate",
"Benchmark",
"BenchmarkInitError",
"BenchmarkSource",
"deactivate",
"delete",
"LegacyDataset",
"require",
]
Loading

0 comments on commit d373b67

Please sign in to comment.