-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
validate: profile CUDA commands using nvprof
- Loading branch information
Showing
33 changed files
with
1,242 additions
and
185 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from pathlib import Path | ||
|
||
ROOT_DIR = Path(__file__).parent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import click | ||
import yaml | ||
from pathlib import Path | ||
from os import PathLike | ||
from typing import Optional | ||
|
||
from gpucachesim import ROOT_DIR | ||
|
||
REPO_ROOT_DIR = ROOT_DIR.parent | ||
DEFAULT_BENCH_FILE = REPO_ROOT_DIR / "test-apps/test-apps-materialized.yml" | ||
|
||
|
||
class Benchmarks: | ||
def __init__(self, path: PathLike) -> None: | ||
"""load the materialized benchmark config""" | ||
|
||
with open(path or DEFAULT_BENCH_FILE, "rb") as f: | ||
benchmarks = yaml.safe_load(f) | ||
|
||
self.benchmarks = benchmarks["benchmarks"] | ||
|
||
def __getitem__(self, bench_name: str): | ||
return self.benchmarks[bench_name] | ||
|
||
def get_bench_config(self, bench_name: str, input_idx: int): | ||
return self.benchmarks[bench_name][input_idx] | ||
|
||
|
||
@click.command() | ||
@click.option("--path", default=DEFAULT_BENCH_FILE, help="Path to materialized benchmark config") | ||
def main(path): | ||
from pprint import pprint | ||
|
||
print(path) | ||
b = Benchmarks(path) | ||
|
||
benchmark_names = list(b.benchmarks.keys()) | ||
pprint(benchmark_names) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import click | ||
|
||
import gpucachesim.stats.stats as stats | ||
import gpucachesim.stats.native as native | ||
from gpucachesim.benchmarks import Benchmarks | ||
|
||
|
||
@click.command() | ||
@click.option("--path", help="Path to materialized benchmark config") | ||
@click.option("--bench", help="Benchmark name") | ||
@click.option("--input", default=0, help="Input index") | ||
def main(path, bench, input): | ||
from pprint import pprint | ||
|
||
b = Benchmarks(path) | ||
if bench is None: | ||
raise NotImplemented | ||
print(bench, input) | ||
bench_config = b.get_bench_config(bench, input) | ||
# pprint(bench_config) | ||
|
||
our_stats = stats.Stats(bench_config["simulate"]) | ||
native_stats = native.Stats(bench_config["simulate"]) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
class AccelsimStats: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from os import PathLike | ||
|
||
|
||
class Stats: | ||
def __init__(self, result_dir: PathLike) -> None: | ||
self.path = result_dir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from os import PathLike | ||
|
||
|
||
class Stats: | ||
def __init__(self, result_dir: PathLike) -> None: | ||
self.path = result_dir |
Oops, something went wrong.