Skip to content

[CI] Add graph finalize benchmark from compute-benchmarks #19021

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

Merged
merged 1 commit into from
Jun 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 76 additions & 1 deletion devops/scripts/benchmarks/benches/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def git_url(self) -> str:
return "https://github.com/intel/compute-benchmarks.git"

def git_hash(self) -> str:
return "ffd199db86a904451f0697cb25a0e7a6b9f2006f"
return "83b9ae3ebb3563552409f3a317cdc1cf3d3ca6bd"

def setup(self):
if options.sycl is None:
Expand Down Expand Up @@ -113,6 +113,9 @@ def additional_metadata(self) -> dict[str, BenchmarkMetadata]:
"SubmitGraph": BenchmarkMetadata(
type="group", tags=["submit", "micro", "SYCL", "UR", "L0", "graph"]
),
"FinalizeGraph": BenchmarkMetadata(
type="group", tags=["finalize", "micro", "SYCL", "graph"]
),
}

def benchmarks(self) -> list[Benchmark]:
Expand Down Expand Up @@ -169,6 +172,10 @@ def benchmarks(self) -> list[Benchmark]:
ExecImmediateCopyQueue(self, 0, 1, "Device", "Device", 1024),
ExecImmediateCopyQueue(self, 1, 1, "Device", "Host", 1024),
VectorSum(self),
GraphApiFinalizeGraph(self, RUNTIMES.SYCL, 0, "Gromacs"),
GraphApiFinalizeGraph(self, RUNTIMES.SYCL, 1, "Gromacs"),
GraphApiFinalizeGraph(self, RUNTIMES.SYCL, 0, "Llama"),
GraphApiFinalizeGraph(self, RUNTIMES.SYCL, 1, "Llama"),
]

# Add UR-specific benchmarks
Expand Down Expand Up @@ -1005,3 +1012,71 @@ def bin_args(self) -> list[str]:
f"--measureMode={self.measure_mode}",
"--iterations=1000",
]


class GraphApiFinalizeGraph(ComputeBenchmark):
def __init__(
self,
bench,
runtime: RUNTIMES,
rebuild_graph_every_iteration,
graph_structure,
):
self.rebuild_graph_every_iteration = rebuild_graph_every_iteration
self.graph_structure = graph_structure
self.iterations = 10000
# LLama graph is about 10X the size of Gromacs, so reduce the
# iterations to avoid excessive benchmark time.
if graph_structure == "Llama":
self.iterations /= 10

super().__init__(
bench,
f"graph_api_benchmark_{runtime.value}",
"FinalizeGraph",
runtime,
)

def explicit_group(self):
return f"FinalizeGraph, GraphStructure: {self.graph_structure}"

def description(self) -> str:
what_is_measured = ""

if self.rebuild_graph_every_iteration == 0:
what_is_measured = (
"It measures finalizing the same modifiable graph repeatedly "
"over multiple iterations."
)
else:
what_is_measured = (
"It measures finalizing a unique modifiable graph per iteration."
)

return (
"Measures the time taken to finalize a SYCL graph, using a graph "
f"structure based on the usage of graphs in {self.graph_structure}. "
f"{what_is_measured}"
)

def name(self):
return f"graph_api_benchmark_{self.runtime.value} FinalizeGraph rebuildGraphEveryIter:{self.rebuild_graph_every_iteration} graphStructure:{self.graph_structure}"

def display_name(self) -> str:
return f"{self.runtime.value.upper()} FinalizeGraph, rebuildGraphEveryIter {self.rebuild_graph_every_iteration}, graphStructure {self.graph_structure}"

def get_tags(self):
return [
"graph",
runtime_to_tag_name(self.runtime),
"micro",
"finalize",
"latency",
]

def bin_args(self) -> list[str]:
return [
f"--iterations={self.iterations}",
f"--rebuildGraphEveryIter={self.rebuild_graph_every_iteration}",
f"--graphStructure={self.graph_structure}",
]
Loading