Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add target to generate stubs for python modules #13

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,11 @@ set(SHARED_LIB_FLAGS -fPIC)
add_subdirectory(third_party)
add_subdirectory(pybuda)

### Generate stubs for ttforge
### Run `cmake --build build -- make_stubs` to generate stubs
add_custom_target(make_stubs
COMMAND pip install mypy
COMMAND stubgen -m pybuda._C -m pybuda._C.autograd -m pybuda._C.graph -m pybuda._C.torch_device -m pybuda._C.runtime -o pybuda -v
COMMENT "Generating stubs for ttforge"
USES_TERMINAL
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
2 changes: 1 addition & 1 deletion pybuda/pybuda/_C/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from . import autograd as autograd, graph as graph, torch_device as torch_device
from . import autograd as autograd, graph as graph, runtime as runtime, torch_device as torch_device
from typing import ClassVar

BLACKHOLE: Arch
Expand Down
338 changes: 0 additions & 338 deletions pybuda/pybuda/_C/backend_api.pyi

This file was deleted.

Loading
Loading