hotpath 0.2.2__tar.gz → 0.2.3__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 (136) hide show
  1. {hotpath-0.2.2 → hotpath-0.2.3}/CHANGELOG.md +10 -0
  2. {hotpath-0.2.2 → hotpath-0.2.3}/PKG-INFO +1 -1
  3. {hotpath-0.2.2 → hotpath-0.2.3}/hotpath_py/__init__.py +1 -1
  4. {hotpath-0.2.2 → hotpath-0.2.3}/pyproject.toml +1 -1
  5. {hotpath-0.2.2 → hotpath-0.2.3}/src/clock_control.cpp +33 -5
  6. {hotpath-0.2.2 → hotpath-0.2.3}/src/main.cpp +1 -1
  7. {hotpath-0.2.2 → hotpath-0.2.3}/.github/workflows/ci.yml +0 -0
  8. {hotpath-0.2.2 → hotpath-0.2.3}/.github/workflows/gpu-smoke.yml +0 -0
  9. {hotpath-0.2.2 → hotpath-0.2.3}/.github/workflows/release.yml +0 -0
  10. {hotpath-0.2.2 → hotpath-0.2.3}/.gitignore +0 -0
  11. {hotpath-0.2.2 → hotpath-0.2.3}/.smoke-bench-a.json +0 -0
  12. {hotpath-0.2.2 → hotpath-0.2.3}/.smoke-bench-b.json +0 -0
  13. {hotpath-0.2.2 → hotpath-0.2.3}/CMakeLists.txt +0 -0
  14. {hotpath-0.2.2 → hotpath-0.2.3}/PLAN.MD +0 -0
  15. {hotpath-0.2.2 → hotpath-0.2.3}/README.md +0 -0
  16. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/fixtures/smoke_prefix_traffic.jsonl +0 -0
  17. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/fixtures/smoke_traffic.jsonl +0 -0
  18. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/fixtures/traffic.jsonl +0 -0
  19. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_aggregate.cpp +0 -0
  20. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_artifacts.cpp +0 -0
  21. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_attach.cpp +0 -0
  22. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_audit.cpp +0 -0
  23. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_batch_analyzer.cpp +0 -0
  24. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_bench.cpp +0 -0
  25. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_bench_json.cpp +0 -0
  26. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_cache_analyzer.cpp +0 -0
  27. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_categorizer.cpp +0 -0
  28. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_cli.cpp +0 -0
  29. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_clock_control.cpp +0 -0
  30. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_diff.cpp +0 -0
  31. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_disagg_model.cpp +0 -0
  32. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_doctor.cpp +0 -0
  33. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_export.cpp +0 -0
  34. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_interactive.cpp +0 -0
  35. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_log_parser.cpp +0 -0
  36. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_otlp_export.cpp +0 -0
  37. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_parser.cpp +0 -0
  38. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_phase_analyzer.cpp +0 -0
  39. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_prefix_analyzer.cpp +0 -0
  40. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_recommender.cpp +0 -0
  41. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_remote.cpp +0 -0
  42. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_report.cpp +0 -0
  43. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_request_trace.cpp +0 -0
  44. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_serve_report.cpp +0 -0
  45. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_server.cpp +0 -0
  46. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_sglang_metrics.cpp +0 -0
  47. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_stability.cpp +0 -0
  48. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_store.cpp +0 -0
  49. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_targets.cpp +0 -0
  50. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_traffic.cpp +0 -0
  51. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_traffic_replayer.cpp +0 -0
  52. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_validate.cpp +0 -0
  53. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_vllm_metrics.cpp +0 -0
  54. {hotpath-0.2.2 → hotpath-0.2.3}/cpp_tests/test_workload_classifier.cpp +0 -0
  55. {hotpath-0.2.2 → hotpath-0.2.3}/hotpath_py/bench_cuda.py +0 -0
  56. {hotpath-0.2.2 → hotpath-0.2.3}/hotpath_py/bench_cuda_kernels.py +0 -0
  57. {hotpath-0.2.2 → hotpath-0.2.3}/hotpath_py/cli.py +0 -0
  58. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/aggregate.h +0 -0
  59. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/artifacts.h +0 -0
  60. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/batch_analyzer.h +0 -0
  61. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/bench/kernels/rms_norm.h +0 -0
  62. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/bench/kernels/rotary_emb.h +0 -0
  63. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/bench/kernels/silu_mul.h +0 -0
  64. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/bench/registry.h +0 -0
  65. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/bench/runner.h +0 -0
  66. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/cache_analyzer.h +0 -0
  67. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/clock_control.h +0 -0
  68. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/diff.h +0 -0
  69. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/disagg_model.h +0 -0
  70. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/doctor.h +0 -0
  71. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/export.h +0 -0
  72. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/kv_config.h +0 -0
  73. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/log_parser.h +0 -0
  74. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/ops.h +0 -0
  75. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/otlp_export.h +0 -0
  76. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/phase_analyzer.h +0 -0
  77. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/prefix_analyzer.h +0 -0
  78. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/profiler/attach.h +0 -0
  79. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/profiler/categorizer.h +0 -0
  80. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/profiler/kernel_record.h +0 -0
  81. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/profiler/parser.h +0 -0
  82. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/profiler/runner.h +0 -0
  83. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/profiler/server.h +0 -0
  84. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/profiler/vllm_metrics.h +0 -0
  85. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/recommender.h +0 -0
  86. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/remote.h +0 -0
  87. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/report.h +0 -0
  88. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/request_trace.h +0 -0
  89. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/serve_profiler.h +0 -0
  90. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/sglang_metrics.h +0 -0
  91. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/stability.h +0 -0
  92. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/store.h +0 -0
  93. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/targets.h +0 -0
  94. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/traffic.h +0 -0
  95. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/traffic_replayer.h +0 -0
  96. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/validate.h +0 -0
  97. {hotpath-0.2.2 → hotpath-0.2.3}/include/hotpath/workload_classifier.h +0 -0
  98. {hotpath-0.2.2 → hotpath-0.2.3}/src/advisor/disagg_model.cpp +0 -0
  99. {hotpath-0.2.2 → hotpath-0.2.3}/src/advisor/kv_config.cpp +0 -0
  100. {hotpath-0.2.2 → hotpath-0.2.3}/src/advisor/recommender.cpp +0 -0
  101. {hotpath-0.2.2 → hotpath-0.2.3}/src/advisor/workload_classifier.cpp +0 -0
  102. {hotpath-0.2.2 → hotpath-0.2.3}/src/aggregate.cpp +0 -0
  103. {hotpath-0.2.2 → hotpath-0.2.3}/src/artifacts.cpp +0 -0
  104. {hotpath-0.2.2 → hotpath-0.2.3}/src/bench/kernels/rms_norm.cpp +0 -0
  105. {hotpath-0.2.2 → hotpath-0.2.3}/src/bench/kernels/rotary_emb.cpp +0 -0
  106. {hotpath-0.2.2 → hotpath-0.2.3}/src/bench/kernels/silu_mul.cpp +0 -0
  107. {hotpath-0.2.2 → hotpath-0.2.3}/src/bench/registry.cpp +0 -0
  108. {hotpath-0.2.2 → hotpath-0.2.3}/src/bench/runner.cpp +0 -0
  109. {hotpath-0.2.2 → hotpath-0.2.3}/src/diff.cpp +0 -0
  110. {hotpath-0.2.2 → hotpath-0.2.3}/src/doctor.cpp +0 -0
  111. {hotpath-0.2.2 → hotpath-0.2.3}/src/export/otlp_export.cpp +0 -0
  112. {hotpath-0.2.2 → hotpath-0.2.3}/src/export.cpp +0 -0
  113. {hotpath-0.2.2 → hotpath-0.2.3}/src/interactive.cpp +0 -0
  114. {hotpath-0.2.2 → hotpath-0.2.3}/src/interactive.h +0 -0
  115. {hotpath-0.2.2 → hotpath-0.2.3}/src/ops.cpp +0 -0
  116. {hotpath-0.2.2 → hotpath-0.2.3}/src/profiler/attach.cpp +0 -0
  117. {hotpath-0.2.2 → hotpath-0.2.3}/src/profiler/categorizer.cpp +0 -0
  118. {hotpath-0.2.2 → hotpath-0.2.3}/src/profiler/parser.cpp +0 -0
  119. {hotpath-0.2.2 → hotpath-0.2.3}/src/profiler/runner.cpp +0 -0
  120. {hotpath-0.2.2 → hotpath-0.2.3}/src/profiler/server.cpp +0 -0
  121. {hotpath-0.2.2 → hotpath-0.2.3}/src/profiler/sglang_metrics.cpp +0 -0
  122. {hotpath-0.2.2 → hotpath-0.2.3}/src/profiler/vllm_metrics.cpp +0 -0
  123. {hotpath-0.2.2 → hotpath-0.2.3}/src/remote.cpp +0 -0
  124. {hotpath-0.2.2 → hotpath-0.2.3}/src/report.cpp +0 -0
  125. {hotpath-0.2.2 → hotpath-0.2.3}/src/serving/batch_analyzer.cpp +0 -0
  126. {hotpath-0.2.2 → hotpath-0.2.3}/src/serving/cache_analyzer.cpp +0 -0
  127. {hotpath-0.2.2 → hotpath-0.2.3}/src/serving/log_parser.cpp +0 -0
  128. {hotpath-0.2.2 → hotpath-0.2.3}/src/serving/phase_analyzer.cpp +0 -0
  129. {hotpath-0.2.2 → hotpath-0.2.3}/src/serving/prefix_analyzer.cpp +0 -0
  130. {hotpath-0.2.2 → hotpath-0.2.3}/src/serving/serve_profiler.cpp +0 -0
  131. {hotpath-0.2.2 → hotpath-0.2.3}/src/serving/traffic_replayer.cpp +0 -0
  132. {hotpath-0.2.2 → hotpath-0.2.3}/src/stability.cpp +0 -0
  133. {hotpath-0.2.2 → hotpath-0.2.3}/src/store.cpp +0 -0
  134. {hotpath-0.2.2 → hotpath-0.2.3}/src/targets.cpp +0 -0
  135. {hotpath-0.2.2 → hotpath-0.2.3}/src/traffic.cpp +0 -0
  136. {hotpath-0.2.2 → hotpath-0.2.3}/src/validate.cpp +0 -0
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.2.3 - 2026-04-05
4
+
5
+ Clock-lock privilege escalation fix.
6
+
7
+ Highlights:
8
+
9
+ - `hotpath lock-clocks` and `hotpath unlock-clocks` now retry through `sudo` when direct `nvidia-smi` access fails for a non-root interactive user
10
+ - manual fallback messages now suggest the correct `sudo nvidia-smi ...` command when privilege escalation is required
11
+ - keeps the existing direct path for environments where clock locking already works without `sudo`
12
+
3
13
  ## v0.2.2 - 2026-04-05
4
14
 
5
15
  Release workflow safety rollback.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: hotpath
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Profile vLLM inference under RL-style rollout workloads.
5
5
  Keywords: cuda,nsys,profiling,rl,vllm
6
6
  Classifier: Development Status :: 4 - Beta
@@ -1,5 +1,5 @@
1
1
  from .cli import main
2
2
 
3
- __version__ = "0.2.2"
3
+ __version__ = "0.2.3"
4
4
 
5
5
  __all__ = ["main", "__version__"]
@@ -6,7 +6,7 @@ build-backend = "scikit_build_core.build"
6
6
 
7
7
  [project]
8
8
  name = "hotpath"
9
- version = "0.2.2"
9
+ version = "0.2.3"
10
10
  description = "Profile vLLM inference under RL-style rollout workloads."
11
11
  readme = "README.md"
12
12
  requires-python = ">=3.10"
@@ -8,6 +8,8 @@
8
8
  #include <string>
9
9
  #include <vector>
10
10
 
11
+ #include <unistd.h>
12
+
11
13
  namespace hotpath {
12
14
  namespace {
13
15
 
@@ -116,13 +118,39 @@ std::optional<std::int64_t> extract_locked_sm_clock_mhz(
116
118
  }
117
119
 
118
120
  std::string lock_failure_message(const std::string& command) {
119
- return "failed to lock GPU clocks with nvidia-smi. Run `" + command +
121
+ const std::string manual_command =
122
+ geteuid() == 0 ? command : "sudo " + command;
123
+ return "failed to lock GPU clocks with nvidia-smi. Run `" + manual_command +
120
124
  "` manually (root may be required).";
121
125
  }
122
126
 
123
127
  std::string unlock_failure_message() {
124
- return "failed to unlock GPU clocks with nvidia-smi. Run "
125
- "`nvidia-smi --reset-gpu-clocks` manually (root may be required).";
128
+ const std::string manual_command =
129
+ geteuid() == 0 ? "nvidia-smi --reset-gpu-clocks"
130
+ : "sudo nvidia-smi --reset-gpu-clocks";
131
+ return "failed to unlock GPU clocks with nvidia-smi. Run `" + manual_command +
132
+ "` manually (root may be required).";
133
+ }
134
+
135
+ bool command_exists(const std::string& program) {
136
+ return run_command_status("command -v " + program + " > /dev/null 2>&1") == 0;
137
+ }
138
+
139
+ bool should_retry_with_sudo() {
140
+ return geteuid() != 0 &&
141
+ isatty(STDIN_FILENO) &&
142
+ (isatty(STDOUT_FILENO) || isatty(STDERR_FILENO)) &&
143
+ command_exists("sudo");
144
+ }
145
+
146
+ int run_gpu_clock_command(const std::string& command) {
147
+ if (run_command_status(command + " > /dev/null 2>&1") == 0) {
148
+ return 0;
149
+ }
150
+ if (!should_retry_with_sudo()) {
151
+ return 1;
152
+ }
153
+ return run_command_status("sudo " + command);
126
154
  }
127
155
 
128
156
  } // namespace
@@ -202,13 +230,13 @@ void lock_gpu_clocks(std::optional<std::int64_t> freq_mhz) {
202
230
  const std::string command = "nvidia-smi --lock-gpu-clocks=" +
203
231
  std::to_string(freq) + "," +
204
232
  std::to_string(freq);
205
- if (run_command_status(command + " > /dev/null 2>&1") != 0) {
233
+ if (run_gpu_clock_command(command) != 0) {
206
234
  throw std::runtime_error(lock_failure_message(command));
207
235
  }
208
236
  }
209
237
 
210
238
  void unlock_gpu_clocks() {
211
- if (run_command_status("nvidia-smi --reset-gpu-clocks > /dev/null 2>&1") != 0) {
239
+ if (run_gpu_clock_command("nvidia-smi --reset-gpu-clocks") != 0) {
212
240
  throw std::runtime_error(unlock_failure_message());
213
241
  }
214
242
  }
@@ -3075,7 +3075,7 @@ int main(int argc, char** argv) {
3075
3075
  }
3076
3076
 
3077
3077
  if (command == "version") {
3078
- std::cout << "hotpath 0.2.2\n";
3078
+ std::cout << "hotpath 0.2.3\n";
3079
3079
  return 0;
3080
3080
  }
3081
3081
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes