carm-roofline 1.0.0.dev2__tar.gz → 1.0.0.dev3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/PKG-INFO +26 -22
  2. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/README.md +23 -20
  3. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/suites/memory_sweep.py +6 -4
  4. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/carm_roofline.egg-info/PKG-INFO +26 -22
  5. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/carm_roofline.egg-info/SOURCES.txt +1 -7
  6. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/carm_roofline.egg-info/requires.txt +2 -1
  7. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/carm_roofline.egg-info/top_level.txt +1 -0
  8. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/gui/config.py +3 -2
  9. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/gui/dashboard.py +16 -3
  10. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/pyproject.toml +5 -3
  11. carm_roofline-1.0.0.dev3/results_paths.py +13 -0
  12. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/run_config.py +5 -4
  13. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/test_bench/builder.py +3 -0
  14. carm_roofline-1.0.0.dev2/DBI_AI_Calculator.py +0 -940
  15. carm_roofline-1.0.0.dev2/PMU_AI_Calculator.py +0 -219
  16. carm_roofline-1.0.0.dev2/SDE_AI_Calculator.py +0 -804
  17. carm_roofline-1.0.0.dev2/architecture/tests/REFACTOR.md +0 -2
  18. carm_roofline-1.0.0.dev2/architecture/tests/frequency +0 -0
  19. carm_roofline-1.0.0.dev2/architecture/tests/x86/cache +0 -0
  20. carm_roofline-1.0.0.dev2/architecture/tests/x86/features +0 -0
  21. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/LICENSE +0 -0
  22. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/architecture/__init__.py +0 -0
  23. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/architecture/architecture.py +0 -0
  24. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/architecture/arm.py +0 -0
  25. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/architecture/config.py +0 -0
  26. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/architecture/detect.py +0 -0
  27. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/architecture/frequency.py +0 -0
  28. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/architecture/memory.py +0 -0
  29. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/architecture/riscv.py +0 -0
  30. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/architecture/tests/arm/features.c +0 -0
  31. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/architecture/tests/arm/frequency.h +0 -0
  32. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/architecture/tests/arm/vlen.c +0 -0
  33. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/architecture/tests/frequency.c +0 -0
  34. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/architecture/tests/riscv/frequency.h +0 -0
  35. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/architecture/tests/riscv/rvv_version.c +0 -0
  36. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/architecture/tests/riscv/vlen.c +0 -0
  37. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/architecture/tests/x86/cache.c +0 -0
  38. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/architecture/tests/x86/features.c +0 -0
  39. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/architecture/tests/x86/frequency.h +0 -0
  40. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/architecture/tests/x86/x86_avx512/frequency.h +0 -0
  41. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/architecture/x86.py +0 -0
  42. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/arguments.py +0 -0
  43. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/__init__.py +0 -0
  44. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/benchmark.py +0 -0
  45. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/benchmarking.py +0 -0
  46. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/generation/__init__.py +0 -0
  47. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/generation/arm.py +0 -0
  48. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/generation/code_gen/__init__.py +0 -0
  49. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/generation/code_gen/data_type.py +0 -0
  50. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/generation/code_gen/instruction.py +0 -0
  51. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/generation/code_gen/operation.py +0 -0
  52. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/generation/code_gen/register.py +0 -0
  53. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/generation/isa.py +0 -0
  54. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/generation/parameters.py +0 -0
  55. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/generation/riscv.py +0 -0
  56. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/generation/x86.py +0 -0
  57. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/interface.py +0 -0
  58. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/output/__init__.py +0 -0
  59. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/output/arithmetic.py +0 -0
  60. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/output/base.py +0 -0
  61. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/output/common.py +0 -0
  62. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/output/memory.py +0 -0
  63. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/output/memory_sweep.py +0 -0
  64. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/output/mixed.py +0 -0
  65. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/output/roofline.py +0 -0
  66. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/result.py +0 -0
  67. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/suites/__init__.py +0 -0
  68. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/suites/arithmetic.py +0 -0
  69. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/suites/base.py +0 -0
  70. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/suites/memory.py +0 -0
  71. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/suites/mixed.py +0 -0
  72. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/benchmark/suites/roofline.py +0 -0
  73. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/carm.py +0 -0
  74. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/carm_roofline.egg-info/dependency_links.txt +0 -0
  75. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/carm_roofline.egg-info/entry_points.txt +0 -0
  76. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/context.py +0 -0
  77. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/error.py +0 -0
  78. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/exec_interface.py +0 -0
  79. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/gui/__init__.py +0 -0
  80. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/gui/assets/CARM_icon.svg +0 -0
  81. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/gui/assets/CHAMP_logo.svg +0 -0
  82. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/gui/assets/menu_icon.png +0 -0
  83. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/gui/assets/style.css +0 -0
  84. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/gui/gui_utils.py +0 -0
  85. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/output_utils.py +0 -0
  86. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/setup.cfg +0 -0
  87. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/test_bench/__init__.py +0 -0
  88. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/test_bench/test_bench.c +0 -0
  89. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/test_bench/test_bench.h +0 -0
  90. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/test_bench/wrapper.inl +0 -0
  91. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/units.py +0 -0
  92. {carm_roofline-1.0.0.dev2 → carm_roofline-1.0.0.dev3}/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: carm-roofline
3
- Version: 1.0.0.dev2
3
+ Version: 1.0.0.dev3
4
4
  Summary: CARM: Cache-Aware Roofline Model benchmarking and visualization toolkit
5
5
  Author: CHaMP Team
6
6
  License: GNU LESSER GENERAL PUBLIC LICENSE
@@ -525,9 +525,10 @@ Description-Content-Type: text/markdown
525
525
  License-File: LICENSE
526
526
  Requires-Dist: rich>=14.3.2
527
527
  Requires-Dist: rich-argparse>=1.7.0
528
- Requires-Dist: numpy>=1.24.4
528
+ Requires-Dist: numpy>=2.0.0
529
529
  Requires-Dist: matplotlib>=3.7.2
530
530
  Requires-Dist: tomli>=2.0.0
531
+ Requires-Dist: platformdirs>=4.0.0
531
532
  Provides-Extra: gui
532
533
  Requires-Dist: dash[diskcache]; extra == "gui"
533
534
  Requires-Dist: dash-bootstrap-components; extra == "gui"
@@ -545,42 +546,45 @@ Requires-Dist: carm-roofline[dev,gui]; extra == "all"
545
546
  Dynamic: license-file
546
547
 
547
548
 
548
- # CARM Roofline
549
+ # The CARM Tool
549
550
 
550
- CARM is a Cache-Aware Roofline Model toolkit for CPU benchmarking and visualization.
551
+
552
+ Cache-Aware Roofline Model (CARM) toolkit - benchmark, visualize and profile Intel, AMD, ARM, RISC-V CPUs and NVIDIA, AMD GPUs.
551
553
 
552
554
  The package provides:
553
555
 
554
- - automatic microbenchmark generation for supported ISAs
556
+ - automatic benchmarking for supported ISAs
555
557
  - arithmetic, memory, and roofline benchmark modes
556
- - CLI output in table, JSON, CSV, and plot formats
557
558
  - optional web GUI for interactive result visualization
558
559
 
560
+ > [!WARNING]
561
+ > The development branch and associated python package are still experimental, and do not include all features yet. For a stable release, please refer to the main branch.
562
+
559
563
  ## Installation
560
564
 
561
565
  Install from PyPI:
562
566
 
563
567
  ```bash
568
+ # command-line interface only:
564
569
  pip install carm-roofline
570
+ # with GUI extras:
571
+ pip install carm-roofline[gui]
572
+ # with all extras (GUI + development tools):
573
+ pip install carm-roofline[all]
565
574
  ```
566
575
 
567
- Install with optional GUI dependencies:
568
-
569
- ```bash
570
- pip install "carm-roofline[gui]"
571
- ```
572
-
573
- Install all extras (GUI + development tools):
576
+ To avoid conflicts with other packages, we recommend installing in a virtual environment:
574
577
 
575
578
  ```bash
576
- pip install "carm-roofline[all]"
579
+ python -m venv carm-env
580
+ source carm-env/bin/activate
581
+ pip install carm-roofline[all]
577
582
  ```
578
583
 
579
584
  ## Requirements
580
585
 
581
- - Python 3.10+
582
- - Linux (POSIX)
583
- - GCC toolchain (for compiling benchmark binaries)
586
+ - Python 3.9+
587
+ - GCC (for compiling benchmark binaries)
584
588
 
585
589
  ## Command-Line Interface
586
590
 
@@ -594,7 +598,7 @@ Available subcommands:
594
598
 
595
599
  - `benchmark` - run benchmark suites
596
600
  - `gui` - launch the results dashboard
597
- - `profile` - reserved (not implemented yet)
601
+ - `profile` - coming soon
598
602
 
599
603
  Show help:
600
604
 
@@ -627,12 +631,12 @@ carm benchmark --dry-run --test arithmetic --test-time 1 --verbose 4
627
631
 
628
632
  ## Output and Results
629
633
 
630
- By default, results are written under `carm_results`.
634
+ By default, results are written under the platform user data directory for the `carm` app (via platformdirs). On linux, this is typically `~/.local/share/carm/`, on Windows, `%APPDATA%\carm\`, and on MacOS, `~/Library/Application Support/carm/`.
631
635
 
632
636
  Control output directory and format(s):
633
637
 
634
638
  ```bash
635
- carm benchmark --output-dir carm_results --output-fmt table json csv plot
639
+ carm benchmark --output-dir ./carm_results --output-fmt table json csv plot
636
640
  ```
637
641
 
638
642
  Use `--name` to label result files:
@@ -652,12 +656,12 @@ carm gui
652
656
  Custom results location and port:
653
657
 
654
658
  ```bash
655
- carm gui --results-dir carm_results --gui-port 8050
659
+ carm gui --results-dir ./carm_results --gui-port 8050
656
660
  ```
657
661
 
658
662
  ## Publications and Citation
659
663
 
660
- If you use CARM in papers or reports, please cite:
664
+ If you use the CARM and the CARM Tool in papers or reports, please cite:
661
665
 
662
666
  <p>
663
667
  <a href="https://doi.org/10.1109/L-CA.2013.6" alt="Publication">
@@ -1,40 +1,43 @@
1
1
 
2
- # CARM Roofline
2
+ # The CARM Tool
3
3
 
4
- CARM is a Cache-Aware Roofline Model toolkit for CPU benchmarking and visualization.
4
+
5
+ Cache-Aware Roofline Model (CARM) toolkit - benchmark, visualize and profile Intel, AMD, ARM, RISC-V CPUs and NVIDIA, AMD GPUs.
5
6
 
6
7
  The package provides:
7
8
 
8
- - automatic microbenchmark generation for supported ISAs
9
+ - automatic benchmarking for supported ISAs
9
10
  - arithmetic, memory, and roofline benchmark modes
10
- - CLI output in table, JSON, CSV, and plot formats
11
11
  - optional web GUI for interactive result visualization
12
12
 
13
+ > [!WARNING]
14
+ > The development branch and associated python package are still experimental, and do not include all features yet. For a stable release, please refer to the main branch.
15
+
13
16
  ## Installation
14
17
 
15
18
  Install from PyPI:
16
19
 
17
20
  ```bash
21
+ # command-line interface only:
18
22
  pip install carm-roofline
23
+ # with GUI extras:
24
+ pip install carm-roofline[gui]
25
+ # with all extras (GUI + development tools):
26
+ pip install carm-roofline[all]
19
27
  ```
20
28
 
21
- Install with optional GUI dependencies:
22
-
23
- ```bash
24
- pip install "carm-roofline[gui]"
25
- ```
26
-
27
- Install all extras (GUI + development tools):
29
+ To avoid conflicts with other packages, we recommend installing in a virtual environment:
28
30
 
29
31
  ```bash
30
- pip install "carm-roofline[all]"
32
+ python -m venv carm-env
33
+ source carm-env/bin/activate
34
+ pip install carm-roofline[all]
31
35
  ```
32
36
 
33
37
  ## Requirements
34
38
 
35
- - Python 3.10+
36
- - Linux (POSIX)
37
- - GCC toolchain (for compiling benchmark binaries)
39
+ - Python 3.9+
40
+ - GCC (for compiling benchmark binaries)
38
41
 
39
42
  ## Command-Line Interface
40
43
 
@@ -48,7 +51,7 @@ Available subcommands:
48
51
 
49
52
  - `benchmark` - run benchmark suites
50
53
  - `gui` - launch the results dashboard
51
- - `profile` - reserved (not implemented yet)
54
+ - `profile` - coming soon
52
55
 
53
56
  Show help:
54
57
 
@@ -81,12 +84,12 @@ carm benchmark --dry-run --test arithmetic --test-time 1 --verbose 4
81
84
 
82
85
  ## Output and Results
83
86
 
84
- By default, results are written under `carm_results`.
87
+ By default, results are written under the platform user data directory for the `carm` app (via platformdirs). On linux, this is typically `~/.local/share/carm/`, on Windows, `%APPDATA%\carm\`, and on MacOS, `~/Library/Application Support/carm/`.
85
88
 
86
89
  Control output directory and format(s):
87
90
 
88
91
  ```bash
89
- carm benchmark --output-dir carm_results --output-fmt table json csv plot
92
+ carm benchmark --output-dir ./carm_results --output-fmt table json csv plot
90
93
  ```
91
94
 
92
95
  Use `--name` to label result files:
@@ -106,12 +109,12 @@ carm gui
106
109
  Custom results location and port:
107
110
 
108
111
  ```bash
109
- carm gui --results-dir carm_results --gui-port 8050
112
+ carm gui --results-dir ./carm_results --gui-port 8050
110
113
  ```
111
114
 
112
115
  ## Publications and Citation
113
116
 
114
- If you use CARM in papers or reports, please cite:
117
+ If you use the CARM and the CARM Tool in papers or reports, please cite:
115
118
 
116
119
  <p>
117
120
  <a href="https://doi.org/10.1109/L-CA.2013.6" alt="Publication">
@@ -16,7 +16,7 @@ from output_utils import debug
16
16
  from units import Bandwidth, Bytes
17
17
 
18
18
  from ..benchmark import MemoryBenchmark
19
- from ..generation import MemoryBenchmarkParams
19
+ from ..generation import MemoryBenchmarkParams, MemoryLayoutMode
20
20
  from .base import ISABenchmarkSuite
21
21
 
22
22
  if TYPE_CHECKING:
@@ -92,8 +92,7 @@ class MemorySweepBenchmarkSuite(ISABenchmarkSuite):
92
92
  (level_num, level_info.name)
93
93
  for level_num, level_info in zip(
94
94
  topology.available_cache_levels(),
95
- topology,
96
- strict=True,
95
+ iter(topology),
97
96
  )
98
97
  ]
99
98
 
@@ -159,13 +158,15 @@ class MemorySweepBenchmarkSuite(ISABenchmarkSuite):
159
158
  size_per_thread = Bytes(int(size_bytes))
160
159
 
161
160
  # Classify: find the smallest cache level whose per-thread capacity
162
- # is ≥ the sweep size. Fall back to DRAM label if none matches.
161
+ # is >= the sweep size. Fall back to DRAM label if none matches.
163
162
  assigned_level_name: str = dram_level_name
164
163
  assigned_affinity: CacheAwareThreadAffinity = dram_affinity
165
164
  for _lvl_num, lvl_name, avail, aff in cache_levels_for_classification:
166
165
  if size_per_thread <= avail:
167
166
  assigned_level_name = lvl_name
168
167
  assigned_affinity = aff
168
+ # L1 can suffer from 4k aliasing - use single-array layout to prevent speculative forwarding issues
169
+ mem_layout = MemoryLayoutMode.single if _lvl_num == 1 else MemoryLayoutMode.split
169
170
  break
170
171
 
171
172
  # Use sweep{i:02d} as memory_level_name to guarantee unique C
@@ -178,6 +179,7 @@ class MemorySweepBenchmarkSuite(ISABenchmarkSuite):
178
179
  load_store_ratio=benchmark.ld_st_ratio,
179
180
  size_per_thread=size_per_thread,
180
181
  memory_level_name=sweep_label,
182
+ layout_mode=mem_layout,
181
183
  )
182
184
 
183
185
  bench_spec = isa.generate_memory(params, context)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: carm-roofline
3
- Version: 1.0.0.dev2
3
+ Version: 1.0.0.dev3
4
4
  Summary: CARM: Cache-Aware Roofline Model benchmarking and visualization toolkit
5
5
  Author: CHaMP Team
6
6
  License: GNU LESSER GENERAL PUBLIC LICENSE
@@ -525,9 +525,10 @@ Description-Content-Type: text/markdown
525
525
  License-File: LICENSE
526
526
  Requires-Dist: rich>=14.3.2
527
527
  Requires-Dist: rich-argparse>=1.7.0
528
- Requires-Dist: numpy>=1.24.4
528
+ Requires-Dist: numpy>=2.0.0
529
529
  Requires-Dist: matplotlib>=3.7.2
530
530
  Requires-Dist: tomli>=2.0.0
531
+ Requires-Dist: platformdirs>=4.0.0
531
532
  Provides-Extra: gui
532
533
  Requires-Dist: dash[diskcache]; extra == "gui"
533
534
  Requires-Dist: dash-bootstrap-components; extra == "gui"
@@ -545,42 +546,45 @@ Requires-Dist: carm-roofline[dev,gui]; extra == "all"
545
546
  Dynamic: license-file
546
547
 
547
548
 
548
- # CARM Roofline
549
+ # The CARM Tool
549
550
 
550
- CARM is a Cache-Aware Roofline Model toolkit for CPU benchmarking and visualization.
551
+
552
+ Cache-Aware Roofline Model (CARM) toolkit - benchmark, visualize and profile Intel, AMD, ARM, RISC-V CPUs and NVIDIA, AMD GPUs.
551
553
 
552
554
  The package provides:
553
555
 
554
- - automatic microbenchmark generation for supported ISAs
556
+ - automatic benchmarking for supported ISAs
555
557
  - arithmetic, memory, and roofline benchmark modes
556
- - CLI output in table, JSON, CSV, and plot formats
557
558
  - optional web GUI for interactive result visualization
558
559
 
560
+ > [!WARNING]
561
+ > The development branch and associated python package are still experimental, and do not include all features yet. For a stable release, please refer to the main branch.
562
+
559
563
  ## Installation
560
564
 
561
565
  Install from PyPI:
562
566
 
563
567
  ```bash
568
+ # command-line interface only:
564
569
  pip install carm-roofline
570
+ # with GUI extras:
571
+ pip install carm-roofline[gui]
572
+ # with all extras (GUI + development tools):
573
+ pip install carm-roofline[all]
565
574
  ```
566
575
 
567
- Install with optional GUI dependencies:
568
-
569
- ```bash
570
- pip install "carm-roofline[gui]"
571
- ```
572
-
573
- Install all extras (GUI + development tools):
576
+ To avoid conflicts with other packages, we recommend installing in a virtual environment:
574
577
 
575
578
  ```bash
576
- pip install "carm-roofline[all]"
579
+ python -m venv carm-env
580
+ source carm-env/bin/activate
581
+ pip install carm-roofline[all]
577
582
  ```
578
583
 
579
584
  ## Requirements
580
585
 
581
- - Python 3.10+
582
- - Linux (POSIX)
583
- - GCC toolchain (for compiling benchmark binaries)
586
+ - Python 3.9+
587
+ - GCC (for compiling benchmark binaries)
584
588
 
585
589
  ## Command-Line Interface
586
590
 
@@ -594,7 +598,7 @@ Available subcommands:
594
598
 
595
599
  - `benchmark` - run benchmark suites
596
600
  - `gui` - launch the results dashboard
597
- - `profile` - reserved (not implemented yet)
601
+ - `profile` - coming soon
598
602
 
599
603
  Show help:
600
604
 
@@ -627,12 +631,12 @@ carm benchmark --dry-run --test arithmetic --test-time 1 --verbose 4
627
631
 
628
632
  ## Output and Results
629
633
 
630
- By default, results are written under `carm_results`.
634
+ By default, results are written under the platform user data directory for the `carm` app (via platformdirs). On linux, this is typically `~/.local/share/carm/`, on Windows, `%APPDATA%\carm\`, and on MacOS, `~/Library/Application Support/carm/`.
631
635
 
632
636
  Control output directory and format(s):
633
637
 
634
638
  ```bash
635
- carm benchmark --output-dir carm_results --output-fmt table json csv plot
639
+ carm benchmark --output-dir ./carm_results --output-fmt table json csv plot
636
640
  ```
637
641
 
638
642
  Use `--name` to label result files:
@@ -652,12 +656,12 @@ carm gui
652
656
  Custom results location and port:
653
657
 
654
658
  ```bash
655
- carm gui --results-dir carm_results --gui-port 8050
659
+ carm gui --results-dir ./carm_results --gui-port 8050
656
660
  ```
657
661
 
658
662
  ## Publications and Citation
659
663
 
660
- If you use CARM in papers or reports, please cite:
664
+ If you use the CARM and the CARM Tool in papers or reports, please cite:
661
665
 
662
666
  <p>
663
667
  <a href="https://doi.org/10.1109/L-CA.2013.6" alt="Publication">
@@ -1,8 +1,5 @@
1
- DBI_AI_Calculator.py
2
1
  LICENSE
3
- PMU_AI_Calculator.py
4
2
  README.md
5
- SDE_AI_Calculator.py
6
3
  arguments.py
7
4
  carm.py
8
5
  context.py
@@ -10,6 +7,7 @@ error.py
10
7
  exec_interface.py
11
8
  output_utils.py
12
9
  pyproject.toml
10
+ results_paths.py
13
11
  run_config.py
14
12
  units.py
15
13
  utils.py
@@ -22,8 +20,6 @@ architecture/frequency.py
22
20
  architecture/memory.py
23
21
  architecture/riscv.py
24
22
  architecture/x86.py
25
- architecture/tests/REFACTOR.md
26
- architecture/tests/frequency
27
23
  architecture/tests/frequency.c
28
24
  architecture/tests/arm/features.c
29
25
  architecture/tests/arm/frequency.h
@@ -31,9 +27,7 @@ architecture/tests/arm/vlen.c
31
27
  architecture/tests/riscv/frequency.h
32
28
  architecture/tests/riscv/rvv_version.c
33
29
  architecture/tests/riscv/vlen.c
34
- architecture/tests/x86/cache
35
30
  architecture/tests/x86/cache.c
36
- architecture/tests/x86/features
37
31
  architecture/tests/x86/features.c
38
32
  architecture/tests/x86/frequency.h
39
33
  architecture/tests/x86/x86_avx512/frequency.h
@@ -1,8 +1,9 @@
1
1
  rich>=14.3.2
2
2
  rich-argparse>=1.7.0
3
- numpy>=1.24.4
3
+ numpy>=2.0.0
4
4
  matplotlib>=3.7.2
5
5
  tomli>=2.0.0
6
+ platformdirs>=4.0.0
6
7
 
7
8
  [all]
8
9
  carm-roofline[dev,gui]
@@ -7,6 +7,7 @@ error
7
7
  exec_interface
8
8
  gui
9
9
  output_utils
10
+ results_paths
10
11
  run_config
11
12
  test_bench
12
13
  units
@@ -4,6 +4,7 @@ import argparse
4
4
  from pathlib import Path
5
5
 
6
6
  from arguments import InsertsArguments
7
+ from results_paths import default_results_root
7
8
 
8
9
 
9
10
  class GUIConfig(InsertsArguments):
@@ -21,8 +22,8 @@ class GUIConfig(InsertsArguments):
21
22
  parser.add_argument(
22
23
  "--results-dir",
23
24
  type=Path,
24
- default=Path("carm_results"),
25
- help="Results directory root (default: carm_results, relative to current working directory)",
25
+ default=default_results_root(),
26
+ help="Results directory root (default: <user-data-directory>/carm)",
26
27
  )
27
28
  parser.add_argument("--gui-host", default="127.0.0.1", help="Host address for the Dash server")
28
29
  parser.add_argument("--gui-port", type=int, default=8050, help="Port for the Dash server")
@@ -25,9 +25,11 @@ import plotly.graph_objects as go
25
25
  from dash import ALL, DiskcacheManager, Input, Output, State, callback_context, dcc, html, no_update
26
26
  from dash.exceptions import PreventUpdate
27
27
 
28
- # Local Python Scripts
29
28
  import utils as ut
30
29
 
30
+ # Local Python Scripts
31
+ from results_paths import default_results_root
32
+
31
33
  from . import gui_utils as gut
32
34
 
33
35
  log = logging.getLogger("werkzeug")
@@ -40,7 +42,7 @@ cache = diskcache.Cache(str(cache_dir))
40
42
  background_callback_manager = DiskcacheManager(cache)
41
43
 
42
44
 
43
- DEFAULT_RESULTS_ROOT = (Path.cwd() / "carm_results").resolve()
45
+ DEFAULT_RESULTS_ROOT = default_results_root()
44
46
  RESULTS_ROOT = DEFAULT_RESULTS_ROOT
45
47
  roof_results_path = str((RESULTS_ROOT / "roofline").resolve())
46
48
  csv_files = []
@@ -2423,6 +2425,18 @@ _register_filter_dropdown_callbacks("")
2423
2425
  _register_filter_dropdown_callbacks("2")
2424
2426
 
2425
2427
 
2428
+ @app.callback(
2429
+ [
2430
+ *[Output(f"{field_id}-dynamic-dropdown", "value") for field_id, _ in FILTER_DROPDOWN_FIELDS],
2431
+ *[Output(f"{field_id}-dynamic-dropdown2", "value") for field_id, _ in FILTER_DROPDOWN_FIELDS],
2432
+ ],
2433
+ Input("filename", "value"),
2434
+ prevent_initial_call=True,
2435
+ )
2436
+ def reset_filter_dropdown_values(_selected_file: str | None) -> list[None]:
2437
+ return [None] * (len(FILTER_DROPDOWN_FIELDS) * 2)
2438
+
2439
+
2426
2440
  @app.callback(
2427
2441
  [
2428
2442
  Output(component_id="graphs", component_property="figure"),
@@ -2538,7 +2552,6 @@ def analysis(
2538
2552
  min_gflops2 = 1e99
2539
2553
  change_annotation = 0
2540
2554
 
2541
- # Get queries for both sets of inputs
2542
2555
  query1 = construct_query(isa, precision, threads, loads, stores, interleaved, dram_bytes, fp_inst, date)
2543
2556
  query2 = construct_query(isa2, precision2, threads2, loads2, stores2, interleaved2, dram_bytes2, fp_inst2, date2)
2544
2557
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "carm-roofline"
3
- version = "1.0.0.dev2"
3
+ version = "1.0.0.dev3"
4
4
  description = "CARM: Cache-Aware Roofline Model benchmarking and visualization toolkit"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.9"
@@ -23,9 +23,10 @@ classifiers = [
23
23
  dependencies = [
24
24
  "rich>=14.3.2",
25
25
  "rich-argparse>=1.7.0",
26
- "numpy>=1.24.4",
26
+ "numpy>=2.0.0",
27
27
  "matplotlib>=3.7.2",
28
28
  "tomli>=2.0.0",
29
+ "platformdirs>=4.0.0",
29
30
  ]
30
31
 
31
32
  [project.optional-dependencies]
@@ -78,6 +79,7 @@ py-modules = [
78
79
  "error",
79
80
  "exec_interface",
80
81
  "output_utils",
82
+ "results_paths",
81
83
  "run_config",
82
84
  "units",
83
85
  "utils",
@@ -195,7 +197,7 @@ markers = [
195
197
  # ============================================================================
196
198
 
197
199
  [tool.mypy]
198
- python_version = "3.10"
200
+ python_version = "3.9"
199
201
  strict = true
200
202
  strict_equality = true
201
203
  show_error_codes = true
@@ -0,0 +1,13 @@
1
+ from __future__ import annotations
2
+
3
+ from pathlib import Path
4
+
5
+ from platformdirs import user_data_dir
6
+
7
+
8
+ def user_data_dir_for_results() -> Path:
9
+ return Path(user_data_dir("carm", appauthor=None)).expanduser()
10
+
11
+
12
+ def default_results_root() -> Path:
13
+ return user_data_dir_for_results()
@@ -6,6 +6,7 @@ from pathlib import Path
6
6
  from arguments import InsertsArguments, enum_action
7
7
  from benchmark.output.base import OutputKind
8
8
  from output_utils import warn
9
+ from results_paths import default_results_root
9
10
 
10
11
 
11
12
  class RunConfig(InsertsArguments):
@@ -39,15 +40,15 @@ class RunConfig(InsertsArguments):
39
40
  )
40
41
  parser.add_argument(
41
42
  "--output-dir",
42
- default=Path("carm_results"),
43
+ default=default_results_root(),
43
44
  nargs="?",
44
45
  type=Path,
45
- help="Directory to write result files (default: carm_results)",
46
+ help="Directory to write result files (default: platform user data dir for app 'carm')",
46
47
  )
47
48
  parser.add_argument(
48
49
  "--output-fmt",
49
50
  nargs="+",
50
51
  action=enum_action(OutputKind),
51
- default={OutputKind.TABLE, OutputKind.PLOT, OutputKind.JSON},
52
- help="Output format(s): table, plot, json, csv (default: table plot json)",
52
+ default={OutputKind.TABLE, OutputKind.PLOT, OutputKind.JSON, OutputKind.CSV},
53
+ help="Output format(s): table, plot, json, csv (default: table plot json csv)",
53
54
  )
@@ -364,6 +364,9 @@ def run_microbenchmarks(
364
364
  error_msg += f"stderr:\n{result.stderr}"
365
365
  raise RuntimeError(error_msg)
366
366
 
367
+ if result.stderr:
368
+ debug(f"Benchmark debug output:\n{result.stderr}")
369
+
367
370
  detail("Microbenchmarks completed successfully")
368
371
  return str(result.stdout)
369
372