Skip to content

Commit

Permalink
Merge pull request #13 from tenstorrent/milant/adding_target_for_gene…
Browse files Browse the repository at this point in the history
…rating_stubs

This PR adds target which can be used to generate python stubs.
To invoke run `cmake --build build -- make_stubs`

Removing stubs which are not used anymore.

fixes #9
  • Loading branch information
mtopalovicTT authored Jul 25, 2024
2 parents 67ed584 + bc14da2 commit 7885d9f
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 692 deletions.
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

0 comments on commit 7885d9f

Please sign in to comment.