Skip to content

Commit

Permalink
[Lang] Keep ti.pyfunc (#7530)
Browse files Browse the repository at this point in the history
Issue: fixes #7324

### Brief Summary
  • Loading branch information
lin-hitonami authored Mar 10, 2023
1 parent 2a4cc84 commit 10b062d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
1 change: 0 additions & 1 deletion python/taichi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
'lang.misc._serialize'),
'block_dim': ('Please use ti.loop_config(block_dim=...) instead.',
'lang.misc._block_dim'),
'pyfunc': ('Please avoid using it.', 'lang.kernel_impl.pyfunc'),
'TriMesh':
('Please import meshtaichi_patcher as Patcher and use Patcher.load_mesh(...) instead.',
'lang.mesh._TriMesh'),
Expand Down
2 changes: 1 addition & 1 deletion python/taichi/lang/kernel_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1149,4 +1149,4 @@ def _getattr(self, item):
return cls


__all__ = ["data_oriented", "func", "kernel"]
__all__ = ["data_oriented", "func", "kernel", "pyfunc"]
15 changes: 8 additions & 7 deletions tests/python/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,14 @@ def _get_expected_matrix_apis():
'j', 'jk', 'jkl', 'jl', 'k', 'kernel', 'kl', 'l', 'lang', 'length',
'linalg', 'log', 'loop_config', 'math', 'max', 'mesh_local',
'mesh_patch_idx', 'metal', 'min', 'ndarray', 'ndrange', 'no_activate',
'one', 'opengl', 'polar_decompose', 'pow', 'profiler', 'randn', 'random',
'raw_div', 'raw_mod', 'ref', 'rescale_index', 'reset', 'rgb_to_hex',
'root', 'round', 'rsqrt', 'select', 'set_logging_level', 'simt', 'sin',
'solve', 'sparse_matrix_builder', 'sqrt', 'static', 'static_assert',
'static_print', 'stop_grad', 'svd', 'sym_eig', 'sync', 'tan', 'tanh',
'template', 'tools', 'types', 'u16', 'u32', 'u64', 'u8', 'ui', 'uint16',
'uint32', 'uint64', 'uint8', 'vulkan', 'wasm', 'x64', 'x86_64', 'zero'
'one', 'opengl', 'polar_decompose', 'pow', 'profiler', 'pyfunc', 'randn',
'random', 'raw_div', 'raw_mod', 'ref', 'rescale_index', 'reset',
'rgb_to_hex', 'root', 'round', 'rsqrt', 'select', 'set_logging_level',
'simt', 'sin', 'solve', 'sparse_matrix_builder', 'sqrt', 'static',
'static_assert', 'static_print', 'stop_grad', 'svd', 'sym_eig', 'sync',
'tan', 'tanh', 'template', 'tools', 'types', 'u16', 'u32', 'u64', 'u8',
'ui', 'uint16', 'uint32', 'uint64', 'uint8', 'vulkan', 'wasm', 'x64',
'x86_64', 'zero'
]
user_api[ti.ad] = [
'FwdMode', 'Tape', 'clear_all_gradients', 'grad_for', 'grad_replaced',
Expand Down

0 comments on commit 10b062d

Please sign in to comment.