Skip to content

Conversation

@MagellaX
Copy link
Owner

@MagellaX MagellaX commented Aug 24, 2025

Summary

  • add pyproject.toml with pinned CUDA and Triton build requirements
  • expand .env.example with GPU arch flags and cache paths
  • set up CI workflow to build wheels for SM80 and SM90

Testing

  • pytest (fails: TabError, ModuleNotFoundError: yaml)

https://chatgpt.com/codex/tasks/task_e_68ab6a20aff08322808d5c4d81ddc7fd


Summary by cubic

Adds pyproject.toml and a GitHub Actions workflow to build CUDA wheels for SM80 and SM90. Updates .env.example with GPU arch and cache settings to standardize local and CI builds.

  • New Features
    • Added pyproject.toml with setuptools build backend; pins torch==2.1.0 and triton==2.1.0 (CUDA 12.1 noted in tool config).
    • Introduced CI workflow to build wheels on push/PR for SM 80 and 90 (Python 3.10), using TORCH_CUDA_ARCH_LIST from a matrix.
    • Expanded .env.example with TORCH_CUDA_ARCH_LIST, CUDA_HOME, and CUDA/TRITON cache paths.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 issues found across 3 files

React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.

readme = "README.md"
license = {file = "LICENSE"}
requires-python = ">=3.8"
dependencies = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PyYAML is imported but not declared as a dependency; add "pyyaml" to [project].dependencies to fix ModuleNotFoundError.

(Based on your team's feedback about pytest failing with ModuleNotFoundError: yaml.)

Prompt for AI agents
Address the following comment on pyproject.toml at line 18:

<comment>PyYAML is imported but not declared as a dependency; add &quot;pyyaml&quot; to [project].dependencies to fix ModuleNotFoundError.

(Based on your team&#39;s feedback about pytest failing with ModuleNotFoundError: yaml.)</comment>

<file context>
@@ -0,0 +1,25 @@
+[build-system]
+requires = [
+    &quot;setuptools&gt;=61&quot;,
+    &quot;wheel&quot;,
+    &quot;torch==2.1.0&quot;,
+    &quot;triton==2.1.0&quot;,
+]
+build-backend = &quot;setuptools.build_meta&quot;
+
</file context>

pyproject.toml Outdated
"setuptools>=61",
"wheel",
"torch==2.1.0",
"triton==2.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Triton is listed in build requirements; move it to project dependencies to avoid heavyweight installs during build isolation.

Prompt for AI agents
Address the following comment on pyproject.toml at line 6:

<comment>Triton is listed in build requirements; move it to project dependencies to avoid heavyweight installs during build isolation.</comment>

<file context>
@@ -0,0 +1,25 @@
+[build-system]
+requires = [
+    &quot;setuptools&gt;=61&quot;,
+    &quot;wheel&quot;,
+    &quot;torch==2.1.0&quot;,
+    &quot;triton==2.1.0&quot;,
+]
+build-backend = &quot;setuptools.build_meta&quot;
</file context>

pyproject.toml Outdated
requires = [
"setuptools>=61",
"wheel",
"torch==2.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PyTorch is listed as a build requirement, which will trigger heavyweight installs in the isolated build env; keep build-system requires minimal (build tools only).

Prompt for AI agents
Address the following comment on pyproject.toml at line 5:

<comment>PyTorch is listed as a build requirement, which will trigger heavyweight installs in the isolated build env; keep build-system requires minimal (build tools only).</comment>

<file context>
@@ -0,0 +1,25 @@
+[build-system]
+requires = [
+    &quot;setuptools&gt;=61&quot;,
+    &quot;wheel&quot;,
+    &quot;torch==2.1.0&quot;,
+    &quot;triton==2.1.0&quot;,
+]
</file context>

MagellaX and others added 2 commits August 25, 2025 01:27
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
@MagellaX
Copy link
Owner Author

@cursoragent fix those issues

@cursor
Copy link

cursor bot commented Aug 24, 2025

I refactored dependency management by moving torch and triton to project dependencies in pyproject.toml and added pyyaml. I also enhanced the .env.example with TORCH_CUDA_ARCH_LIST for build configuration and cleaned up a duplicate function call in the accuracy test.

  • Moved torch==2.1.0 and triton==2.1.0 from build-system.requires to project.dependencies in pyproject.toml. This clarifies them as runtime dependencies rather than just build-time requirements.
  • Added pyyaml>=6.0 as a new dependency to project.dependencies in pyproject.toml.
  • Introduced TORCH_CUDA_ARCH_LIST=80;90 to .env.example to explicitly define target CUDA architectures for compilation, improving build configuration.
  • Removed a duplicate main() function call in stream_attention/benchmarks/accuracy_test.py to fix a minor bug.

4 tasks completed

  • Update .env.example to use ${HOME} for cache paths
  • Fix pyproject: remove torch/triton from build-system; add pyyaml dependency
  • Remove stray tab-indented main() in accuracy_test.py to resolve TabError
  • Run Python compileall to verify no syntax/indentation errors
Open in Cursor Open in Web

Learn more about Cursor Agents

@MagellaX MagellaX merged commit 8e453a0 into main Aug 24, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants