Skip to content

add preloaded UMF benchmarks #17278

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
Mar 5, 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
27 changes: 25 additions & 2 deletions unified-runtime/scripts/benchmarks/benches/umf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ def benchmarks(self) -> list[Benchmark]:
benches = [
GBench(self),
GBenchUmfProxy(self),
GBenchJemalloc(self),
GBenchTbbProxy(self),
]

return benches
Expand Down Expand Up @@ -220,10 +222,31 @@ def parse_output(self, output):
return results


class GBenchUmfProxy(GBenchPreloaded):
class GBenchGlibc(GBenchPreloaded):
def __init__(self, bench, replacing_lib):
super().__init__(bench, lib_to_be_replaced="glibc", replacing_lib=replacing_lib)


class GBenchUmfProxy(GBenchGlibc):
def __init__(self, bench):
super().__init__(bench, lib_to_be_replaced="glibc", replacing_lib="umfProxy")
super().__init__(bench, replacing_lib="umfProxy")

def extra_env_vars(self) -> dict:
umf_proxy_path = os.path.join(options.umf, "lib", "libumf_proxy.so")
return {"LD_PRELOAD": umf_proxy_path}


class GBenchJemalloc(GBenchGlibc):
def __init__(self, bench):
super().__init__(bench, replacing_lib="jemalloc")

def extra_env_vars(self) -> dict:
return {"LD_PRELOAD": "libjemalloc.so"}


class GBenchTbbProxy(GBenchGlibc):
def __init__(self, bench):
super().__init__(bench, replacing_lib="tbbProxy")

def extra_env_vars(self) -> dict:
return {"LD_PRELOAD": "libtbbmalloc_proxy.so"}
Loading