-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sycl-bench benchmarks #2047
Changes from 15 commits
939b4d0
335faaa
56cf9cf
d5b553a
5f374f6
c4854bf
0ab5039
535c723
7d751ba
6895f21
ff3a0f1
20d6859
162681b
2af01f7
98f338b
b1acce4
1499fdd
8479e59
3b2f85e
8df45d8
716f103
50309a8
a2affaa
0358db2
90608c8
ebe4160
379e1bd
7af46ef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,11 +18,13 @@ def __init__(self, directory): | |
return | ||
|
||
def setup(self): | ||
if self.built: | ||
build_path = create_build_path(self.directory, 'compute-benchmarks-build') | ||
self.bins = os.path.join(build_path, 'bin') | ||
|
||
if self.built or not options.rebuild: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, if it is crucial. The change made it possible to run the scripts on cluster nodes with no access to external servers... |
||
return | ||
|
||
repo_path = git_clone(self.directory, "compute-benchmarks-repo", "https://github.com/intel/compute-benchmarks.git", "08c41bb8bc1762ad53c6194df6d36bfcceff4aa2") | ||
build_path = create_build_path(self.directory, 'compute-benchmarks-build') | ||
|
||
configure_command = [ | ||
"cmake", | ||
|
@@ -43,14 +45,14 @@ def setup(self): | |
run(f"cmake --build {build_path} -j", add_sycl=True) | ||
|
||
self.built = True | ||
self.bins = os.path.join(build_path, 'bin') | ||
|
||
class ComputeBenchmark(Benchmark): | ||
def __init__(self, bench, name, test): | ||
self.bench = bench | ||
self.bench_name = name | ||
self.test = test | ||
super().__init__(bench.directory) | ||
self.setup() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed (after reverting the options.rebuild logic). |
||
|
||
def bin_args(self) -> list[str]: | ||
return [] | ||
|
@@ -78,7 +80,7 @@ def run(self, env_vars) -> Result: | |
|
||
result = self.run_bench(command, env_vars) | ||
(label, mean) = self.parse_output(result) | ||
return Result(label=label, value=mean, command=command, env=env_vars, stdout=result, lower_is_better=self.lower_is_better()) | ||
return [ Result(label=self.name(), value=mean, command=command, env=env_vars, stdout=result, lower_is_better=self.lower_is_better()) ] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why are you changing this into an array? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Single benchmark in sycl-bench may return a set of results, because in single run we in fact have a group of benchmarks. Functions in other classes are adjusted |
||
|
||
def parse_output(self, output): | ||
csv_file = io.StringIO(output) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem like a good idea from a security point of view. How is this git authenticated?
This should work similarly to how we publish documentation, see this existing workflow: https://github.com/oneapi-src/unified-runtime/blob/main/.github/workflows/docs.yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In final solution there are no changes in .yml files