wafer-cli 0.2.51__tar.gz → 0.2.52__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 (117) hide show
  1. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/PKG-INFO +1 -1
  2. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/pyproject.toml +1 -1
  3. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/cli.py +13 -3
  4. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/cli_instructions.py +15 -2
  5. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/evaluate.py +4 -4
  6. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/targets.py +1 -1
  7. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer_cli.egg-info/PKG-INFO +1 -1
  8. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/README.md +0 -0
  9. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/setup.cfg +0 -0
  10. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/tests/test_analytics.py +0 -0
  11. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/tests/test_auth.py +0 -0
  12. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/tests/test_billing.py +0 -0
  13. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/tests/test_cli_coverage.py +0 -0
  14. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/tests/test_cli_parity_integration.py +0 -0
  15. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/tests/test_config_integration.py +0 -0
  16. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/tests/test_distributed_traces_cli.py +0 -0
  17. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/tests/test_file_operations_integration.py +0 -0
  18. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/tests/test_kernel_scope_cli.py +0 -0
  19. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/tests/test_nsys_analyze.py +0 -0
  20. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/tests/test_nsys_profile.py +0 -0
  21. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/tests/test_output.py +0 -0
  22. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/tests/test_rocprof_compute_integration.py +0 -0
  23. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/tests/test_skill_commands.py +0 -0
  24. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/tests/test_ssh_integration.py +0 -0
  25. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/tests/test_targets_ops.py +0 -0
  26. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/tests/test_wevin_cli.py +0 -0
  27. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/tests/test_workflow_integration.py +0 -0
  28. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/GUIDE.md +0 -0
  29. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/__init__.py +0 -0
  30. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/agent_defaults.py +0 -0
  31. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/analytics.py +0 -0
  32. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/api_client.py +0 -0
  33. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/auth.py +0 -0
  34. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/autotuner.py +0 -0
  35. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/baseline.py +0 -0
  36. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/billing.py +0 -0
  37. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/config.py +0 -0
  38. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/amd/amd_instinct_gpu_specs.md +0 -0
  39. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/amd/cdna2/01-architecture-overview.md +0 -0
  40. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/amd/cdna2/02-matrix-instructions.md +0 -0
  41. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/amd/cdna2/README.md +0 -0
  42. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/amd/cdna3-isa/01-introduction.md +0 -0
  43. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/amd/cdna3-isa/02-program-organization.md +0 -0
  44. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/amd/cdna3-isa/03-kernel-state.md +0 -0
  45. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/amd/cdna3-isa/04-program-flow-control.md +0 -0
  46. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/amd/cdna3-isa/05-scalar-alu.md +0 -0
  47. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/amd/cdna3-isa/06-vector-alu.md +0 -0
  48. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/amd/cdna3-isa/07-matrix-instructions.md +0 -0
  49. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/amd/cdna3-isa/08-scalar-memory.md +0 -0
  50. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/amd/cdna3-isa/09-vector-memory.md +0 -0
  51. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/amd/cdna3-isa/10-flat-memory.md +0 -0
  52. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/amd/cdna3-isa/11-data-share.md +0 -0
  53. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/amd/cdna3-isa/README.md +0 -0
  54. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/amd/composable-kernel/01-ck-overview.md +0 -0
  55. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/amd/hip/01-hip-programming-model.md +0 -0
  56. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/amd/hip/02-hip-memory-management.md +0 -0
  57. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/amd/hip/03-hip-synchronization.md +0 -0
  58. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/amd/hip/04-hip-intrinsics.md +0 -0
  59. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/amd/rocm-profiling/01-rocprofiler-overview.md +0 -0
  60. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/common/flash-attention/01-flash-attention-overview.md +0 -0
  61. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/common/vllm/01-vllm-overview.md +0 -0
  62. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/nvidia/blackwell/01-architecture-overview.md +0 -0
  63. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/nvidia/cuda-guide/01-cuda-programming-model.md +0 -0
  64. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/nvidia/cuda-guide/02-cuda-memory-management.md +0 -0
  65. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/nvidia/cuda-guide/03-cuda-best-practices.md +0 -0
  66. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/nvidia/cuda-guide/04-cuda-streams-events.md +0 -0
  67. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/nvidia/cutlass/01-cutlass-overview.md +0 -0
  68. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/nvidia/hopper/01-overview.md +0 -0
  69. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/nvidia/hopper/02-streaming-multiprocessor.md +0 -0
  70. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/nvidia/hopper/03-tensor-cores.md +0 -0
  71. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/nvidia/hopper/04-memory-hierarchy.md +0 -0
  72. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/nvidia/hopper/05-synchronization.md +0 -0
  73. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/nvidia/hopper/README.md +0 -0
  74. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/nvidia/nsight/01-nsight-compute-overview.md +0 -0
  75. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/nvidia/nsight/02-nsight-systems.md +0 -0
  76. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/nvidia/ptx-isa/01-ptx-overview.md +0 -0
  77. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/nvidia/ptx-isa/02-ptx-tensor-operations.md +0 -0
  78. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpora/nvidia/triton/01-triton-overview.md +0 -0
  79. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/corpus.py +0 -0
  80. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/distributed_traces.py +0 -0
  81. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/global_config.py +0 -0
  82. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/gpu_run.py +0 -0
  83. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/inference.py +0 -0
  84. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/kernel_scope.py +0 -0
  85. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/ncu_analyze.py +0 -0
  86. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/nsys_analyze.py +0 -0
  87. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/nsys_profile.py +0 -0
  88. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/output.py +0 -0
  89. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/problems.py +0 -0
  90. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/rocprof_compute.py +0 -0
  91. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/rocprof_sdk.py +0 -0
  92. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/rocprof_systems.py +0 -0
  93. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/skills/wafer-guide/SKILL.md +0 -0
  94. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/specs_cli.py +0 -0
  95. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/ssh_keys.py +0 -0
  96. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/target_lock.py +0 -0
  97. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/targets_cli.py +0 -0
  98. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/targets_ops.py +0 -0
  99. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/templates/__init__.py +0 -0
  100. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/templates/aiter_optimize.py +0 -0
  101. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/templates/ask_docs.py +0 -0
  102. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/templates/audit.py +0 -0
  103. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/templates/optimize_flashinfer.py +0 -0
  104. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/templates/optimize_kernel.py +0 -0
  105. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/templates/optimize_kernelbench.py +0 -0
  106. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/templates/optimize_vllm.py +0 -0
  107. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/templates/trace_analyze.py +0 -0
  108. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/tests/test_eval_cli_parity.py +0 -0
  109. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/trace_compare.py +0 -0
  110. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/tracelens.py +0 -0
  111. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/wevin_cli.py +0 -0
  112. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer/workspaces.py +0 -0
  113. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer_cli.egg-info/SOURCES.txt +0 -0
  114. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer_cli.egg-info/dependency_links.txt +0 -0
  115. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer_cli.egg-info/entry_points.txt +0 -0
  116. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer_cli.egg-info/requires.txt +0 -0
  117. {wafer_cli-0.2.51 → wafer_cli-0.2.52}/wafer_cli.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wafer-cli
3
- Version: 0.2.51
3
+ Version: 0.2.52
4
4
  Summary: CLI for running GPU workloads, managing remote workspaces, and evaluating/optimizing kernels
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "wafer-cli"
3
- version = "0.2.51"
3
+ version = "0.2.52"
4
4
  description = "CLI for running GPU workloads, managing remote workspaces, and evaluating/optimizing kernels"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -1405,6 +1405,11 @@ def agent( # noqa: PLR0913
1405
1405
  "--env",
1406
1406
  help="Environment name (coding, remote-target, runpod-sandbox, modal-sandbox). Uses --args for config.",
1407
1407
  ),
1408
+ workspace: str | None = typer.Option(
1409
+ None,
1410
+ "--workspace",
1411
+ help="Workspace ID (requires --env workspace)",
1412
+ ),
1408
1413
  ) -> None:
1409
1414
  """AI assistant for GPU kernel development.
1410
1415
 
@@ -1580,6 +1585,8 @@ def _make_agent_alias(name: str, doc: str) -> None:
1580
1585
  corpus=corpus,
1581
1586
  no_sandbox=no_sandbox,
1582
1587
  no_proxy=no_proxy,
1588
+ env=None,
1589
+ workspace=None,
1583
1590
  )
1584
1591
 
1585
1592
  alias_cmd.__doc__ = doc
@@ -4905,9 +4912,12 @@ def targets_probe(
4905
4912
  # ProbeError already has actionable context
4906
4913
  typer.echo(f"\nError: {e}", err=True)
4907
4914
  raise typer.Exit(1) from None
4908
- except Exception as e:
4909
- # Unexpected errors - include type for debugging
4910
- typer.echo(f"\nUnexpected error probing target: {type(e).__name__}: {e}", err=True)
4915
+ except BaseException as e:
4916
+ # Unwrap ExceptionGroup (from Trio nurseries) to show the actual cause
4917
+ cause = e
4918
+ while isinstance(cause, BaseExceptionGroup) and len(cause.exceptions) == 1:
4919
+ cause = cause.exceptions[0]
4920
+ typer.echo(f"\nUnexpected error probing target: {type(cause).__name__}: {cause}", err=True)
4911
4921
  raise typer.Exit(1) from None
4912
4922
 
4913
4923
  # Display results
@@ -100,7 +100,11 @@ def _format_command_help(cmd_path: str, cmd: click.BaseCommand) -> str:
100
100
  return "\n".join(lines)
101
101
 
102
102
 
103
- def build_cli_instructions(bash_allowlist: list[str]) -> str:
103
+ def build_cli_instructions(
104
+ bash_allowlist: list[str],
105
+ *,
106
+ has_local_gpu: bool = False,
107
+ ) -> str:
104
108
  """Generate CLI instruction text from --help for allowed wafer commands.
105
109
 
106
110
  Walks the typer/click command tree and extracts help text for each
@@ -110,6 +114,10 @@ def build_cli_instructions(bash_allowlist: list[str]) -> str:
110
114
  Args:
111
115
  bash_allowlist: List of allowed bash command prefixes.
112
116
  Example: ["wafer evaluate", "wafer nvidia ncu", "python"]
117
+ has_local_gpu: When True, the header tells the agent it has a local GPU
118
+ (e.g. CLI agents running on a GPU sandbox). When False (default),
119
+ it says there is no local GPU and the agent must use wafer CLI
120
+ for remote execution.
113
121
 
114
122
  Returns:
115
123
  Markdown-formatted CLI instructions, or empty string if no wafer
@@ -144,7 +152,12 @@ def build_cli_instructions(bash_allowlist: list[str]) -> str:
144
152
  if not sections and not template_help:
145
153
  return ""
146
154
 
147
- header = "## Wafer CLI Commands\n\n"
155
+ if has_local_gpu:
156
+ gpu_line = "You have a local GPU. Use `--target local` with wafer CLI commands.\n"
157
+ else:
158
+ gpu_line = "You do not have a local GPU. Use the wafer CLI to run on remote GPU hardware.\n"
159
+
160
+ header = "## Wafer CLI Commands\n\n" + gpu_line
148
161
 
149
162
  result = header + "\n\n".join(sections)
150
163
  if template_help:
@@ -5073,7 +5073,6 @@ async def run_evaluate_kernelbench_local(
5073
5073
 
5074
5074
  ref_path = run_path / "reference.py"
5075
5075
  ref_path.write_text(args.reference.read_text())
5076
-
5077
5076
  inputs_path = None
5078
5077
  if args.inputs:
5079
5078
  inputs_path = run_path / "custom_inputs.py"
@@ -5081,7 +5080,6 @@ async def run_evaluate_kernelbench_local(
5081
5080
 
5082
5081
  eval_script_path = run_path / "kernelbench_eval.py"
5083
5082
  eval_script_path.write_text(KERNELBENCH_EVAL_SCRIPT)
5084
-
5085
5083
  defense_module_path = None
5086
5084
  if args.defensive:
5087
5085
  defense_src = (
@@ -5140,7 +5138,6 @@ async def run_evaluate_kernelbench_local(
5140
5138
  env["CUDA_VISIBLE_DEVICES"] = str(gpu_id)
5141
5139
 
5142
5140
  print(f"Running: {python_exe} kernelbench_eval.py ...")
5143
-
5144
5141
  try:
5145
5142
  result = subprocess.run(
5146
5143
  cmd_parts,
@@ -5339,6 +5336,9 @@ async def run_evaluate_kernelbench(args: KernelBenchEvaluateArgs) -> EvaluateRes
5339
5336
  ),
5340
5337
  )
5341
5338
  return await run_evaluate_kernelbench_docker(args, target)
5339
+ elif isinstance(target, LocalTarget):
5340
+ # Local GPU - no SSH, runs directly as subprocess
5341
+ return await run_evaluate_kernelbench_local(args, target)
5342
5342
  else:
5343
5343
  return EvaluateResult(
5344
5344
  success=False,
@@ -5349,7 +5349,7 @@ async def run_evaluate_kernelbench(args: KernelBenchEvaluateArgs) -> EvaluateRes
5349
5349
  total_tests=0,
5350
5350
  error_message=(
5351
5351
  f"Target type '{type(target).__name__}' not yet supported for KernelBench format. "
5352
- "Use a DigitalOcean, RunPod, Baremetal, or VM target."
5352
+ "Use a Local, DigitalOcean, RunPod, Baremetal, or VM target."
5353
5353
  ),
5354
5354
  )
5355
5355
 
@@ -57,7 +57,7 @@ def _parse_target(data: dict[str, Any]) -> TargetConfig:
57
57
  target_type = data.get("type")
58
58
  if not target_type:
59
59
  raise ValueError(
60
- "Target must have 'type' field (baremetal, vm, modal, workspace, runpod, or digitalocean)"
60
+ "Target must have 'type' field (baremetal, vm, modal, workspace, runpod, digitalocean, or local)"
61
61
  )
62
62
 
63
63
  # Remove type field before passing to dataclass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wafer-cli
3
- Version: 0.2.51
3
+ Version: 0.2.52
4
4
  Summary: CLI for running GPU workloads, managing remote workspaces, and evaluating/optimizing kernels
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
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