gstaichi 0.1.21.dev0__cp310-cp310-win_amd64.whl → 0.1.25.dev0__cp310-cp310-win_amd64.whl

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 (219) hide show
  1. gstaichi/CHANGELOG.md +9 -0
  2. {taichi → gstaichi}/__init__.py +9 -13
  3. {taichi → gstaichi}/_funcs.py +8 -8
  4. {taichi → gstaichi}/_kernels.py +19 -19
  5. gstaichi/_lib/__init__.py +3 -0
  6. taichi/_lib/core/taichi_python.cp310-win_amd64.pyd → gstaichi/_lib/core/gstaichi_python.cp310-win_amd64.pyd +0 -0
  7. taichi/_lib/core/taichi_python.pyi → gstaichi/_lib/core/gstaichi_python.pyi +382 -522
  8. {taichi → gstaichi}/_lib/runtime/runtime_cuda.bc +0 -0
  9. {taichi → gstaichi}/_lib/runtime/runtime_x64.bc +0 -0
  10. {taichi → gstaichi}/_lib/utils.py +15 -15
  11. {taichi → gstaichi}/_logging.py +1 -1
  12. {taichi → gstaichi}/_main.py +24 -31
  13. gstaichi/_snode/__init__.py +5 -0
  14. {taichi → gstaichi}/_snode/fields_builder.py +27 -29
  15. {taichi → gstaichi}/_snode/snode_tree.py +5 -5
  16. gstaichi/_test_tools/__init__.py +0 -0
  17. gstaichi/_test_tools/load_kernel_string.py +30 -0
  18. gstaichi/_version.py +1 -0
  19. {taichi → gstaichi}/_version_check.py +8 -5
  20. gstaichi/ad/__init__.py +3 -0
  21. {taichi → gstaichi}/ad/_ad.py +26 -26
  22. {taichi → gstaichi}/algorithms/_algorithms.py +7 -7
  23. {taichi → gstaichi}/examples/minimal.py +1 -1
  24. {taichi → gstaichi}/experimental.py +1 -1
  25. gstaichi/lang/__init__.py +50 -0
  26. {taichi → gstaichi}/lang/_ndarray.py +30 -26
  27. {taichi → gstaichi}/lang/_ndrange.py +8 -8
  28. gstaichi/lang/_template_mapper.py +199 -0
  29. {taichi → gstaichi}/lang/_texture.py +19 -19
  30. {taichi → gstaichi}/lang/_wrap_inspect.py +7 -7
  31. {taichi → gstaichi}/lang/any_array.py +13 -13
  32. {taichi → gstaichi}/lang/argpack.py +29 -29
  33. gstaichi/lang/ast/__init__.py +5 -0
  34. {taichi → gstaichi}/lang/ast/ast_transformer.py +94 -582
  35. {taichi → gstaichi}/lang/ast/ast_transformer_utils.py +54 -41
  36. gstaichi/lang/ast/ast_transformers/__init__.py +0 -0
  37. gstaichi/lang/ast/ast_transformers/call_transformer.py +267 -0
  38. gstaichi/lang/ast/ast_transformers/function_def_transformer.py +320 -0
  39. {taichi → gstaichi}/lang/ast/checkers.py +5 -5
  40. gstaichi/lang/ast/transform.py +9 -0
  41. {taichi → gstaichi}/lang/common_ops.py +12 -12
  42. gstaichi/lang/exception.py +80 -0
  43. {taichi → gstaichi}/lang/expr.py +22 -22
  44. {taichi → gstaichi}/lang/field.py +29 -27
  45. {taichi → gstaichi}/lang/impl.py +116 -121
  46. {taichi → gstaichi}/lang/kernel_arguments.py +16 -16
  47. {taichi → gstaichi}/lang/kernel_impl.py +330 -363
  48. {taichi → gstaichi}/lang/matrix.py +119 -115
  49. {taichi → gstaichi}/lang/matrix_ops.py +6 -6
  50. {taichi → gstaichi}/lang/matrix_ops_utils.py +4 -4
  51. {taichi → gstaichi}/lang/mesh.py +22 -22
  52. {taichi → gstaichi}/lang/misc.py +39 -68
  53. {taichi → gstaichi}/lang/ops.py +146 -141
  54. {taichi → gstaichi}/lang/runtime_ops.py +2 -2
  55. {taichi → gstaichi}/lang/shell.py +3 -3
  56. {taichi → gstaichi}/lang/simt/__init__.py +1 -1
  57. {taichi → gstaichi}/lang/simt/block.py +7 -7
  58. {taichi → gstaichi}/lang/simt/grid.py +1 -1
  59. {taichi → gstaichi}/lang/simt/subgroup.py +1 -1
  60. {taichi → gstaichi}/lang/simt/warp.py +1 -1
  61. {taichi → gstaichi}/lang/snode.py +46 -44
  62. {taichi → gstaichi}/lang/source_builder.py +13 -13
  63. {taichi → gstaichi}/lang/struct.py +33 -33
  64. {taichi → gstaichi}/lang/util.py +24 -24
  65. gstaichi/linalg/__init__.py +8 -0
  66. {taichi → gstaichi}/linalg/matrixfree_cg.py +14 -14
  67. {taichi → gstaichi}/linalg/sparse_cg.py +10 -10
  68. {taichi → gstaichi}/linalg/sparse_matrix.py +23 -23
  69. {taichi → gstaichi}/linalg/sparse_solver.py +21 -21
  70. {taichi → gstaichi}/math/__init__.py +1 -1
  71. {taichi → gstaichi}/math/_complex.py +21 -20
  72. {taichi → gstaichi}/math/mathimpl.py +56 -56
  73. gstaichi/profiler/__init__.py +6 -0
  74. {taichi → gstaichi}/profiler/kernel_metrics.py +11 -11
  75. {taichi → gstaichi}/profiler/kernel_profiler.py +30 -36
  76. {taichi → gstaichi}/profiler/memory_profiler.py +1 -1
  77. {taichi → gstaichi}/profiler/scoped_profiler.py +2 -2
  78. {taichi → gstaichi}/sparse/_sparse_grid.py +7 -7
  79. {taichi → gstaichi}/tools/__init__.py +4 -4
  80. {taichi → gstaichi}/tools/diagnose.py +10 -17
  81. gstaichi/types/__init__.py +19 -0
  82. {taichi → gstaichi}/types/annotations.py +1 -1
  83. {taichi → gstaichi}/types/compound_types.py +8 -8
  84. {taichi → gstaichi}/types/enums.py +1 -1
  85. {taichi → gstaichi}/types/ndarray_type.py +7 -7
  86. {taichi → gstaichi}/types/primitive_types.py +17 -14
  87. {taichi → gstaichi}/types/quant.py +9 -9
  88. {taichi → gstaichi}/types/texture_type.py +5 -5
  89. {taichi → gstaichi}/types/utils.py +1 -1
  90. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/bin/SPIRV-Tools-shared.dll +0 -0
  91. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/lib/SPIRV-Tools-diff.lib +0 -0
  92. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/lib/SPIRV-Tools-link.lib +0 -0
  93. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/lib/SPIRV-Tools-lint.lib +0 -0
  94. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/lib/SPIRV-Tools-opt.lib +0 -0
  95. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/lib/SPIRV-Tools-reduce.lib +0 -0
  96. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/lib/SPIRV-Tools-shared.lib +0 -0
  97. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/lib/SPIRV-Tools.lib +0 -0
  98. {gstaichi-0.1.21.dev0.dist-info → gstaichi-0.1.25.dev0.dist-info}/METADATA +13 -16
  99. gstaichi-0.1.25.dev0.dist-info/RECORD +138 -0
  100. gstaichi-0.1.25.dev0.dist-info/entry_points.txt +2 -0
  101. gstaichi-0.1.25.dev0.dist-info/top_level.txt +1 -0
  102. gstaichi-0.1.21.dev0.data/data/include/GLFW/glfw3.h +0 -6389
  103. gstaichi-0.1.21.dev0.data/data/include/GLFW/glfw3native.h +0 -594
  104. gstaichi-0.1.21.dev0.data/data/lib/cmake/glfw3/glfw3Config.cmake +0 -3
  105. gstaichi-0.1.21.dev0.data/data/lib/cmake/glfw3/glfw3ConfigVersion.cmake +0 -65
  106. gstaichi-0.1.21.dev0.data/data/lib/cmake/glfw3/glfw3Targets-release.cmake +0 -19
  107. gstaichi-0.1.21.dev0.data/data/lib/cmake/glfw3/glfw3Targets.cmake +0 -107
  108. gstaichi-0.1.21.dev0.data/data/lib/glfw3.lib +0 -0
  109. gstaichi-0.1.21.dev0.dist-info/RECORD +0 -198
  110. gstaichi-0.1.21.dev0.dist-info/entry_points.txt +0 -2
  111. gstaichi-0.1.21.dev0.dist-info/top_level.txt +0 -1
  112. taichi/CHANGELOG.md +0 -17
  113. taichi/_lib/__init__.py +0 -3
  114. taichi/_lib/c_api/bin/taichi_c_api.dll +0 -0
  115. taichi/_lib/c_api/include/taichi/cpp/taichi.hpp +0 -1401
  116. taichi/_lib/c_api/include/taichi/taichi.h +0 -29
  117. taichi/_lib/c_api/include/taichi/taichi_core.h +0 -1111
  118. taichi/_lib/c_api/include/taichi/taichi_cpu.h +0 -29
  119. taichi/_lib/c_api/include/taichi/taichi_cuda.h +0 -36
  120. taichi/_lib/c_api/include/taichi/taichi_platform.h +0 -55
  121. taichi/_lib/c_api/include/taichi/taichi_unity.h +0 -64
  122. taichi/_lib/c_api/include/taichi/taichi_vulkan.h +0 -151
  123. taichi/_lib/c_api/lib/taichi_c_api.lib +0 -0
  124. taichi/_lib/c_api/runtime/runtime_cuda.bc +0 -0
  125. taichi/_lib/c_api/runtime/runtime_x64.bc +0 -0
  126. taichi/_lib/c_api/taichi/lib/cmake/taichi/TaichiConfig.cmake +0 -29
  127. taichi/_lib/c_api/taichi/lib/cmake/taichi/TaichiConfigVersion.cmake +0 -65
  128. taichi/_lib/c_api/taichi/lib/cmake/taichi/TaichiTargets.cmake +0 -121
  129. taichi/_lib/runtime/slim_libdevice.10.bc +0 -0
  130. taichi/_snode/__init__.py +0 -5
  131. taichi/_ti_module/__init__.py +0 -3
  132. taichi/_ti_module/cppgen.py +0 -309
  133. taichi/_ti_module/module.py +0 -145
  134. taichi/_version.py +0 -1
  135. taichi/ad/__init__.py +0 -3
  136. taichi/aot/__init__.py +0 -12
  137. taichi/aot/_export.py +0 -28
  138. taichi/aot/conventions/__init__.py +0 -3
  139. taichi/aot/conventions/gfxruntime140/__init__.py +0 -38
  140. taichi/aot/conventions/gfxruntime140/dr.py +0 -244
  141. taichi/aot/conventions/gfxruntime140/sr.py +0 -613
  142. taichi/aot/module.py +0 -253
  143. taichi/aot/utils.py +0 -151
  144. taichi/graph/__init__.py +0 -3
  145. taichi/graph/_graph.py +0 -292
  146. taichi/lang/__init__.py +0 -50
  147. taichi/lang/ast/__init__.py +0 -5
  148. taichi/lang/ast/transform.py +0 -9
  149. taichi/lang/exception.py +0 -80
  150. taichi/linalg/__init__.py +0 -8
  151. taichi/profiler/__init__.py +0 -6
  152. taichi/shaders/Circles_vk.frag +0 -29
  153. taichi/shaders/Circles_vk.vert +0 -45
  154. taichi/shaders/Circles_vk_frag.spv +0 -0
  155. taichi/shaders/Circles_vk_vert.spv +0 -0
  156. taichi/shaders/Lines_vk.frag +0 -9
  157. taichi/shaders/Lines_vk.vert +0 -11
  158. taichi/shaders/Lines_vk_frag.spv +0 -0
  159. taichi/shaders/Lines_vk_vert.spv +0 -0
  160. taichi/shaders/Mesh_vk.frag +0 -71
  161. taichi/shaders/Mesh_vk.vert +0 -68
  162. taichi/shaders/Mesh_vk_frag.spv +0 -0
  163. taichi/shaders/Mesh_vk_vert.spv +0 -0
  164. taichi/shaders/Particles_vk.frag +0 -95
  165. taichi/shaders/Particles_vk.vert +0 -73
  166. taichi/shaders/Particles_vk_frag.spv +0 -0
  167. taichi/shaders/Particles_vk_vert.spv +0 -0
  168. taichi/shaders/SceneLines2quad_vk_comp.spv +0 -0
  169. taichi/shaders/SceneLines_vk.frag +0 -9
  170. taichi/shaders/SceneLines_vk.vert +0 -12
  171. taichi/shaders/SceneLines_vk_frag.spv +0 -0
  172. taichi/shaders/SceneLines_vk_vert.spv +0 -0
  173. taichi/shaders/SetImage_vk.frag +0 -21
  174. taichi/shaders/SetImage_vk.vert +0 -15
  175. taichi/shaders/SetImage_vk_frag.spv +0 -0
  176. taichi/shaders/SetImage_vk_vert.spv +0 -0
  177. taichi/shaders/Triangles_vk.frag +0 -16
  178. taichi/shaders/Triangles_vk.vert +0 -29
  179. taichi/shaders/Triangles_vk_frag.spv +0 -0
  180. taichi/shaders/Triangles_vk_vert.spv +0 -0
  181. taichi/shaders/lines2quad_vk_comp.spv +0 -0
  182. taichi/types/__init__.py +0 -19
  183. {taichi → gstaichi}/__main__.py +0 -0
  184. {taichi → gstaichi}/_lib/core/__init__.py +0 -0
  185. {taichi → gstaichi}/_lib/core/py.typed +0 -0
  186. {taichi/_lib/c_api → gstaichi/_lib}/runtime/slim_libdevice.10.bc +0 -0
  187. {taichi → gstaichi}/algorithms/__init__.py +0 -0
  188. {taichi → gstaichi}/assets/.git +0 -0
  189. {taichi → gstaichi}/assets/Go-Regular.ttf +0 -0
  190. {taichi → gstaichi}/assets/static/imgs/ti_gallery.png +0 -0
  191. {taichi → gstaichi}/lang/ast/symbol_resolver.py +0 -0
  192. {taichi → gstaichi}/sparse/__init__.py +0 -0
  193. {taichi → gstaichi}/tools/np2ply.py +0 -0
  194. {taichi → gstaichi}/tools/vtk.py +0 -0
  195. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/SPIRV-Tools/cmake/SPIRV-ToolsConfig.cmake +0 -0
  196. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/SPIRV-Tools/cmake/SPIRV-ToolsTarget-release.cmake +0 -0
  197. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/SPIRV-Tools/cmake/SPIRV-ToolsTarget.cmake +0 -0
  198. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/SPIRV-Tools-diff/cmake/SPIRV-Tools-diffConfig.cmake +0 -0
  199. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/SPIRV-Tools-diff/cmake/SPIRV-Tools-diffTargets-release.cmake +0 -0
  200. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/SPIRV-Tools-diff/cmake/SPIRV-Tools-diffTargets.cmake +0 -0
  201. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/SPIRV-Tools-link/cmake/SPIRV-Tools-linkConfig.cmake +0 -0
  202. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/SPIRV-Tools-link/cmake/SPIRV-Tools-linkTargets-release.cmake +0 -0
  203. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/SPIRV-Tools-link/cmake/SPIRV-Tools-linkTargets.cmake +0 -0
  204. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/SPIRV-Tools-lint/cmake/SPIRV-Tools-lintConfig.cmake +0 -0
  205. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/SPIRV-Tools-lint/cmake/SPIRV-Tools-lintTargets-release.cmake +0 -0
  206. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/SPIRV-Tools-lint/cmake/SPIRV-Tools-lintTargets.cmake +0 -0
  207. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/SPIRV-Tools-opt/cmake/SPIRV-Tools-optConfig.cmake +0 -0
  208. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/SPIRV-Tools-opt/cmake/SPIRV-Tools-optTargets-release.cmake +0 -0
  209. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/SPIRV-Tools-opt/cmake/SPIRV-Tools-optTargets.cmake +0 -0
  210. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/SPIRV-Tools-reduce/cmake/SPIRV-Tools-reduceConfig.cmake +0 -0
  211. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/SPIRV-Tools-reduce/cmake/SPIRV-Tools-reduceTarget-release.cmake +0 -0
  212. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/SPIRV-Tools-reduce/cmake/SPIRV-Tools-reduceTarget.cmake +0 -0
  213. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/include/spirv-tools/instrument.hpp +0 -0
  214. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/include/spirv-tools/libspirv.h +0 -0
  215. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/include/spirv-tools/libspirv.hpp +0 -0
  216. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/include/spirv-tools/linker.hpp +0 -0
  217. {gstaichi-0.1.21.dev0.data → gstaichi-0.1.25.dev0.data}/data/include/spirv-tools/optimizer.hpp +0 -0
  218. {gstaichi-0.1.21.dev0.dist-info → gstaichi-0.1.25.dev0.dist-info}/WHEEL +0 -0
  219. {gstaichi-0.1.21.dev0.dist-info → gstaichi-0.1.25.dev0.dist-info}/licenses/LICENSE +0 -0
@@ -6,11 +6,11 @@ Math functions for glsl-like functions and other stuff.
6
6
  """
7
7
  import math
8
8
 
9
- from taichi.lang import impl, ops
10
- from taichi.lang.impl import static, zero
11
- from taichi.lang.kernel_impl import func
12
- from taichi.lang.matrix import Matrix
13
- from taichi.lang.ops import (
9
+ from gstaichi.lang import impl, ops
10
+ from gstaichi.lang.impl import static, zero
11
+ from gstaichi.lang.kernel_impl import func
12
+ from gstaichi.lang.matrix import Matrix
13
+ from gstaichi.lang.ops import (
14
14
  acos,
15
15
  asin,
16
16
  atan2,
@@ -28,8 +28,8 @@ from taichi.lang.ops import (
28
28
  tan,
29
29
  tanh,
30
30
  )
31
- from taichi.types import matrix, template, vector
32
- from taichi.types.primitive_types import f64, u32, u64
31
+ from gstaichi.types import matrix, template, vector
32
+ from gstaichi.types.primitive_types import f64, u32, u64
33
33
 
34
34
  cfg = impl.default_cfg
35
35
 
@@ -108,21 +108,21 @@ def mix(x, y, a):
108
108
  `a` to weight between them. The return value is computed as
109
109
  `x * (1 - a) + a * y`.
110
110
 
111
- The arguments can be scalars or :class:`~taichi.Matrix`,
111
+ The arguments can be scalars or :class:`~gstaichi.Matrix`,
112
112
  as long as the operation can be performed.
113
113
 
114
114
  This function is similar to the `mix` function in GLSL.
115
115
 
116
116
  Args:
117
- x (:mod:`~taichi.types.primitive_types`, :class:`~taichi.Matrix`): Specify
117
+ x (:mod:`~gstaichi.types.primitive_types`, :class:`~gstaichi.Matrix`): Specify
118
118
  the start of the range in which to interpolate.
119
- y (:mod:`~taichi.types.primitive_types`, :class:`~taichi.Matrix`): Specify
119
+ y (:mod:`~gstaichi.types.primitive_types`, :class:`~gstaichi.Matrix`): Specify
120
120
  the end of the range in which to interpolate.
121
- a (:mod:`~taichi.types.primitive_types`, :class:`~taichi.Matrix`): Specify
121
+ a (:mod:`~gstaichi.types.primitive_types`, :class:`~gstaichi.Matrix`): Specify
122
122
  the weight to use to interpolate between x and y.
123
123
 
124
124
  Returns:
125
- (:mod:`~taichi.types.primitive_types`, :class:`~taichi.Matrix`): The linear
125
+ (:mod:`~gstaichi.types.primitive_types`, :class:`~gstaichi.Matrix`): The linear
126
126
  interpolation of `x` and `y` by weight `a`.
127
127
 
128
128
  Example::
@@ -146,15 +146,15 @@ def clamp(x, xmin, xmax):
146
146
  """Constrain a value to lie between two further values, element-wise.
147
147
  The returned value is computed as `min(max(x, xmin), xmax)`.
148
148
 
149
- The arguments can be scalars or :class:`~taichi.Matrix`,
149
+ The arguments can be scalars or :class:`~gstaichi.Matrix`,
150
150
  as long as they can be broadcasted to a common shape.
151
151
 
152
152
  Args:
153
- x (:mod:`~taichi.types.primitive_types`, :class:`~taichi.Matrix`): Specify
153
+ x (:mod:`~gstaichi.types.primitive_types`, :class:`~gstaichi.Matrix`): Specify
154
154
  the value to constrain.
155
- y (:mod:`~taichi.types.primitive_types`, :class:`~taichi.Matrix`): Specify
155
+ y (:mod:`~gstaichi.types.primitive_types`, :class:`~gstaichi.Matrix`): Specify
156
156
  the lower end of the range into which to constrain `x`.
157
- a (:mod:`~taichi.types.primitive_types`, :class:`~taichi.Matrix`): Specify
157
+ a (:mod:`~gstaichi.types.primitive_types`, :class:`~gstaichi.Matrix`): Specify
158
158
  the upper end of the range into which to constrain `x`.
159
159
 
160
160
  Returns:
@@ -181,13 +181,13 @@ def step(edge, x):
181
181
  For element i of the return value, 0.0 is returned if x[i] < edge[i],
182
182
  and 1.0 is returned otherwise.
183
183
 
184
- The two arguments can be scalars or :class:`~taichi.Matrix`,
184
+ The two arguments can be scalars or :class:`~gstaichi.Matrix`,
185
185
  as long as they can be broadcasted to a common shape.
186
186
 
187
187
  Args:
188
- edge (:mod:`~taichi.types.primitive_types`, :class:`~taichi.Matrix`): Specify
188
+ edge (:mod:`~gstaichi.types.primitive_types`, :class:`~gstaichi.Matrix`): Specify
189
189
  the location of the edge of the step function.
190
- x (:mod:`~taichi.types.primitive_types`, :class:`~taichi.Matrix`): Specify
190
+ x (:mod:`~gstaichi.types.primitive_types`, :class:`~gstaichi.Matrix`): Specify
191
191
  the value to be used to generate the step function.
192
192
 
193
193
  Returns:
@@ -209,7 +209,7 @@ def fract(x):
209
209
  It's equivalent to `x - ti.floor(x)`.
210
210
 
211
211
  Args:
212
- x (:mod:`~taichi.types.primitive_types`, :class:`~taichi.Matrix`): The
212
+ x (:mod:`~gstaichi.types.primitive_types`, :class:`~gstaichi.Matrix`): The
213
213
  input value.
214
214
 
215
215
  Returns:
@@ -229,17 +229,17 @@ def smoothstep(edge0, edge1, x):
229
229
  """Performs smooth Hermite interpolation between 0 and 1 when
230
230
  `edge0 < x < edge1`, element-wise.
231
231
 
232
- The arguments can be scalars or :class:`~taichi.Matrix`,
232
+ The arguments can be scalars or :class:`~gstaichi.Matrix`,
233
233
  as long as they can be broadcasted to a common shape.
234
234
 
235
235
  This function is equivalent to the `smoothstep` in GLSL.
236
236
 
237
237
  Args:
238
- edge0 (:mod:`~taichi.types.primitive_types`, :class:`~taichi.Matrix`): Specifies
238
+ edge0 (:mod:`~gstaichi.types.primitive_types`, :class:`~gstaichi.Matrix`): Specifies
239
239
  the value of the lower edge of the Hermite function.
240
- edge1 (:mod:`~taichi.types.primitive_types`, :class:`~taichi.Matrix`): Specifies
240
+ edge1 (:mod:`~gstaichi.types.primitive_types`, :class:`~gstaichi.Matrix`): Specifies
241
241
  the value of the upper edge of the Hermite function.
242
- x (:mod:`~taichi.types.primitive_types`, :class:`~taichi.Matrix`): Specifies
242
+ x (:mod:`~gstaichi.types.primitive_types`, :class:`~gstaichi.Matrix`): Specifies
243
243
  the source value for interpolation.
244
244
 
245
245
  Returns:
@@ -262,7 +262,7 @@ def sign(x):
262
262
  """Extract the sign of the parameter, element-wise.
263
263
 
264
264
  Args:
265
- x (:mod:`~taichi.types.primitive_types`, :class:`~taichi.Matrix`): The
265
+ x (:mod:`~gstaichi.types.primitive_types`, :class:`~gstaichi.Matrix`): The
266
266
  input value.
267
267
 
268
268
  Returns:
@@ -286,7 +286,7 @@ def normalize(v):
286
286
  It's equivalent to the `normalize` function is GLSL.
287
287
 
288
288
  Args:
289
- x (:class:`~taichi.Matrix`): The vector to normalize.
289
+ x (:class:`~gstaichi.Matrix`): The vector to normalize.
290
290
 
291
291
  Returns:
292
292
  The normalized vector :math:`v/|v|`.
@@ -308,7 +308,7 @@ def log2(x):
308
308
  This is equivalent to the `log2` function is GLSL.
309
309
 
310
310
  Args:
311
- x (:class:`~taichi.Matrix`): The input value.
311
+ x (:class:`~gstaichi.Matrix`): The input value.
312
312
 
313
313
  Returns:
314
314
  The base 2 logarithm of `x`.
@@ -335,8 +335,8 @@ def reflect(x, n):
335
335
  `n` should be normalized in order to achieve the desired result.
336
336
 
337
337
  Args:
338
- x (:class:`~taichi.Matrix`): The incident vector.
339
- n (:class:`~taichi.Matrix`): The normal vector.
338
+ x (:class:`~gstaichi.Matrix`): The incident vector.
339
+ n (:class:`~gstaichi.Matrix`): The normal vector.
340
340
 
341
341
  Returns:
342
342
  The reflected vector.
@@ -357,7 +357,7 @@ def degrees(x):
357
357
  """Convert `x` in radians to degrees, element-wise.
358
358
 
359
359
  Args:
360
- x (:class:`~taichi.Matrix`): The input angle in radians.
360
+ x (:class:`~gstaichi.Matrix`): The input angle in radians.
361
361
 
362
362
  Returns:
363
363
  angle in degrees.
@@ -376,7 +376,7 @@ def radians(x):
376
376
  """Convert `x` in degrees to radians, element-wise.
377
377
 
378
378
  Args:
379
- x (:class:`~taichi.Matrix`): The input angle in degrees.
379
+ x (:class:`~gstaichi.Matrix`): The input angle in degrees.
380
380
 
381
381
  Returns:
382
382
  angle in radians.
@@ -397,8 +397,8 @@ def distance(x, y):
397
397
  This function is equivalent to the `distance` function is GLSL.
398
398
 
399
399
  Args:
400
- x (:mod:`~taichi.types.primitive_types`, :class:`~taichi.Matrix`): The first input point.
401
- y (:mod:`~taichi.types.primitive_types`, :class:`~taichi.Matrix`): The second input point.
400
+ x (:mod:`~gstaichi.types.primitive_types`, :class:`~gstaichi.Matrix`): The first input point.
401
+ y (:mod:`~gstaichi.types.primitive_types`, :class:`~gstaichi.Matrix`): The second input point.
402
402
 
403
403
  Returns:
404
404
  The distance between the two points.
@@ -420,12 +420,12 @@ def refract(x, n, eta):
420
420
  This function is equivalent to the `refract` function in GLSL.
421
421
 
422
422
  Args:
423
- x (:class:`~taichi.Matrix`): The incident vector.
424
- n (:class:`~taichi.Matrix`): The normal vector.
423
+ x (:class:`~gstaichi.Matrix`): The incident vector.
424
+ n (:class:`~gstaichi.Matrix`): The normal vector.
425
425
  eta (float): The ratio of indices of refraction.
426
426
 
427
427
  Returns:
428
- :class:`~taichi.Matrix`: The refraction direction vector.
428
+ :class:`~gstaichi.Matrix`: The refraction direction vector.
429
429
 
430
430
  Example::
431
431
 
@@ -447,8 +447,8 @@ def dot(x, y):
447
447
  """Calculate the dot product of two vectors.
448
448
 
449
449
  Args:
450
- x (:class:`~taichi.Matrix`): The first input vector.
451
- y (:class:`~taichi.Matrix`): The second input vector.
450
+ x (:class:`~gstaichi.Matrix`): The first input vector.
451
+ y (:class:`~gstaichi.Matrix`): The second input vector.
452
452
 
453
453
  Returns:
454
454
  The dot product of two vectors.
@@ -469,11 +469,11 @@ def cross(x, y):
469
469
 
470
470
  The two input vectors must have the same dimension :math:`d <= 3`.
471
471
 
472
- This function calls the `cross` method of :class:`~taichi.Vector`.
472
+ This function calls the `cross` method of :class:`~gstaichi.Vector`.
473
473
 
474
474
  Args:
475
- x (:class:`~taichi.Matrix`): The first input vector.
476
- y (:class:`~taichi.Matrix`): The second input vector.
475
+ x (:class:`~gstaichi.Matrix`): The first input vector.
476
+ y (:class:`~gstaichi.Matrix`): The second input vector.
477
477
 
478
478
  Returns:
479
479
  The cross product of two vectors.
@@ -493,8 +493,8 @@ def mod(x, y):
493
493
  """Compute value of one parameter modulo another, element-wise.
494
494
 
495
495
  Args:
496
- x (:mod:`~taichi.types.primitive_types`, :class:`~taichi.Matrix`): The first input.
497
- y (:mod:`~taichi.types.primitive_types`, :class:`~taichi.Matrix`): The second input.
496
+ x (:mod:`~gstaichi.types.primitive_types`, :class:`~gstaichi.Matrix`): The first input.
497
+ y (:mod:`~gstaichi.types.primitive_types`, :class:`~gstaichi.Matrix`): The second input.
498
498
 
499
499
  Returns:
500
500
  the value of `x` modulo `y`. This is computed as `x - y * floor(x/y)`.
@@ -519,7 +519,7 @@ def translate(dx, dy, dz):
519
519
  dz (float): delta z.
520
520
 
521
521
  Returns:
522
- :class:`~taichi.math.mat4`: translation matrix.
522
+ :class:`~gstaichi.math.mat4`: translation matrix.
523
523
 
524
524
  Example::
525
525
 
@@ -549,7 +549,7 @@ def scale(sx, sy, sz):
549
549
  sz (float): scale z.
550
550
 
551
551
  Returns:
552
- :class:`~taichi.math.mat4`: scale matrix.
552
+ :class:`~gstaichi.math.mat4`: scale matrix.
553
553
 
554
554
  Example::
555
555
 
@@ -578,7 +578,7 @@ def rot_by_axis(axis, ang):
578
578
  ang (float): angle in radians unit
579
579
 
580
580
  Returns:
581
- :class:`~taichi.math.mat4`: rotation matrix
581
+ :class:`~gstaichi.math.mat4`: rotation matrix
582
582
  """
583
583
  c = ops.cos(ang)
584
584
  s = ops.sin(ang)
@@ -620,7 +620,7 @@ def rot_yaw_pitch_roll(yaw, pitch, roll):
620
620
  roll (float): roll angle in radians unit
621
621
 
622
622
  Returns:
623
- :class:`~taichi.math.mat4`: rotation matrix
623
+ :class:`~gstaichi.math.mat4`: rotation matrix
624
624
  """
625
625
  ch = ops.cos(yaw)
626
626
  sh = ops.sin(yaw)
@@ -648,7 +648,7 @@ def rotation2d(ang):
648
648
  ang (float): Angle of rotation in radians.
649
649
 
650
650
  Returns:
651
- :class:`~taichi.math.mat2`: 2x2 rotation matrix.
651
+ :class:`~gstaichi.math.mat2`: 2x2 rotation matrix.
652
652
 
653
653
  Example::
654
654
 
@@ -668,7 +668,7 @@ def rotation3d(ang_x, ang_y, ang_z):
668
668
  ang_y (float): angle in radians unit around Y axis
669
669
  ang_z (float): angle in radians unit around Z axis
670
670
  Returns:
671
- :class:`~taichi.math.mat4`: rotation matrix
671
+ :class:`~gstaichi.math.mat4`: rotation matrix
672
672
  Example:
673
673
 
674
674
  >>> ti.math.rotation3d(0.52, -0.785, 1.046)
@@ -684,7 +684,7 @@ def rotation3d(ang_x, ang_y, ang_z):
684
684
  def eye(n: template()):
685
685
  """Returns the nxn identity matrix.
686
686
 
687
- Alias for :func:`~taichi.Matrix.identity`.
687
+ Alias for :func:`~gstaichi.Matrix.identity`.
688
688
  """
689
689
  return Matrix.identity(float, n)
690
690
 
@@ -695,7 +695,7 @@ def length(x):
695
695
 
696
696
  This function is equivalent to the `length` function in GLSL.
697
697
  Args:
698
- x (:class:`~taichi.Matrix`): The vector of which to calculate the length.
698
+ x (:class:`~gstaichi.Matrix`): The vector of which to calculate the length.
699
699
 
700
700
  Returns:
701
701
  The Euclidean norm of the vector.
@@ -711,7 +711,7 @@ def length(x):
711
711
 
712
712
  @func
713
713
  def determinant(m):
714
- """Alias for :func:`taichi.Matrix.determinant`."""
714
+ """Alias for :func:`gstaichi.Matrix.determinant`."""
715
715
  return m.determinant()
716
716
 
717
717
 
@@ -722,7 +722,7 @@ def inverse(mat): # pylint: disable=R1710
722
722
  This function is equivalent to the `inverse` function in GLSL.
723
723
 
724
724
  Args:
725
- mat (:class:`taichi.Matrix`): The matrix of which to take the inverse. \
725
+ mat (:class:`gstaichi.Matrix`): The matrix of which to take the inverse. \
726
726
  Supports only 2x2, 3x3 and 4x4 matrices.
727
727
 
728
728
  Returns:
@@ -744,7 +744,7 @@ def isinf(x):
744
744
  """Determines whether the parameter is positive or negative infinity, element-wise.
745
745
 
746
746
  Args:
747
- x (:mod:`~taichi.types.primitive_types`, :class:`taichi.Matrix`): The input.
747
+ x (:mod:`~gstaichi.types.primitive_types`, :class:`gstaichi.Matrix`): The input.
748
748
 
749
749
  Example:
750
750
 
@@ -770,7 +770,7 @@ def isnan(x):
770
770
  """Determines whether the parameter is a number, element-wise.
771
771
 
772
772
  Args:
773
- x (:mod:`~taichi.types.primitive_types`, :class:`taichi.Matrix`): The input.
773
+ x (:mod:`~gstaichi.types.primitive_types`, :class:`gstaichi.Matrix`): The input.
774
774
 
775
775
  Example:
776
776
 
@@ -795,7 +795,7 @@ def isnan(x):
795
795
  def vdir(ang):
796
796
  """Returns the 2d unit vector with argument equals `ang`.
797
797
 
798
- x (:mod:`~taichi.types.primitive_types`): The input angle in radians.
798
+ x (:mod:`~gstaichi.types.primitive_types`): The input angle in radians.
799
799
 
800
800
  Example:
801
801
 
@@ -0,0 +1,6 @@
1
+ # type: ignore
2
+
3
+ from gstaichi.profiler.kernel_metrics import *
4
+ from gstaichi.profiler.kernel_profiler import *
5
+ from gstaichi.profiler.memory_profiler import *
6
+ from gstaichi.profiler.scoped_profiler import *
@@ -1,24 +1,24 @@
1
1
  # type: ignore
2
2
 
3
- from taichi._lib import core as _ti_core
3
+ from gstaichi._lib import core as _ti_core
4
4
 
5
5
 
6
6
  class CuptiMetric:
7
- """A class to add CUPTI metric for :class:`~taichi.profiler.kernel_profiler.KernelProfiler`.
7
+ """A class to add CUPTI metric for :class:`~gstaichi.profiler.kernel_profiler.KernelProfiler`.
8
8
 
9
9
  This class is designed to add user selected CUPTI metrics.
10
10
  Only available for the CUDA backend now, i.e. you need ``ti.init(kernel_profiler=True, arch=ti.cuda)``.
11
- For usage of this class, see examples in func :func:`~taichi.profiler.set_kernel_profiler_metrics` and :func:`~taichi.profiler.collect_kernel_profiler_metrics`.
11
+ For usage of this class, see examples in func :func:`~gstaichi.profiler.set_kernel_profiler_metrics` and :func:`~gstaichi.profiler.collect_kernel_profiler_metrics`.
12
12
 
13
13
  Args:
14
- name (str): name of metric that collected by CUPTI toolkit. used by :func:`~taichi.profiler.set_kernel_profiler_metrics` and :func:`~taichi.profiler.collect_kernel_profiler_metrics`.
15
- header (str): column header of this metric, used by :func:`~taichi.profiler.print_kernel_profiler_info`.
16
- val_format (str): format for print metric value (and unit of this value), used by :func:`~taichi.profiler.print_kernel_profiler_info`.
17
- scale (float): scale of metric value, used by :func:`~taichi.profiler.print_kernel_profiler_info`.
14
+ name (str): name of metric that collected by CUPTI toolkit. used by :func:`~gstaichi.profiler.set_kernel_profiler_metrics` and :func:`~gstaichi.profiler.collect_kernel_profiler_metrics`.
15
+ header (str): column header of this metric, used by :func:`~gstaichi.profiler.print_kernel_profiler_info`.
16
+ val_format (str): format for print metric value (and unit of this value), used by :func:`~gstaichi.profiler.print_kernel_profiler_info`.
17
+ scale (float): scale of metric value, used by :func:`~gstaichi.profiler.print_kernel_profiler_info`.
18
18
 
19
19
  Example::
20
20
 
21
- >>> import taichi as ti
21
+ >>> import gstaichi as ti
22
22
 
23
23
  >>> ti.init(kernel_profiler=True, arch=ti.cuda)
24
24
  >>> num_elements = 128*1024*1024
@@ -46,7 +46,7 @@ class CuptiMetric:
46
46
  >>> ti.profiler.print_kernel_profiler_info('trace')
47
47
 
48
48
  Note:
49
- For details about using CUPTI in Taichi, please visit https://docs.taichi-lang.org/docs/profiler#advanced-mode.
49
+ For details about using CUPTI in GsTaichi, please visit https://docs.taichi-lang.org/docs/profiler#advanced-mode.
50
50
  """
51
51
 
52
52
  def __init__(self, name="", header="unnamed_header", val_format=" {:8.0f} ", scale=1.0):
@@ -244,7 +244,7 @@ def get_predefined_cupti_metrics(name=""):
244
244
  name (str): cupti metri name.
245
245
  """
246
246
  if name not in predefined_cupti_metrics:
247
- _ti_core.warn("Valid Taichi predefined metrics list (str):")
247
+ _ti_core.warn("Valid GsTaichi predefined metrics list (str):")
248
248
  for key in predefined_cupti_metrics:
249
249
  _ti_core.warn(f" '{key}'")
250
250
  return None
@@ -253,7 +253,7 @@ def get_predefined_cupti_metrics(name=""):
253
253
 
254
254
  # Default metrics list
255
255
  default_cupti_metrics = [dram_bytes_sum]
256
- """The metrics list, each is an instance of the :class:`~taichi.profiler.CuptiMetric`.
256
+ """The metrics list, each is an instance of the :class:`~gstaichi.profiler.CuptiMetric`.
257
257
  Default to `dram_bytes_sum`.
258
258
  """
259
259
 
@@ -2,9 +2,9 @@
2
2
 
3
3
  from contextlib import contextmanager
4
4
 
5
- from taichi._lib import core as _ti_core
6
- from taichi.lang import impl
7
- from taichi.profiler.kernel_metrics import default_cupti_metrics
5
+ from gstaichi._lib import core as _ti_core
6
+ from gstaichi.lang import impl
7
+ from gstaichi.profiler.kernel_metrics import default_cupti_metrics
8
8
 
9
9
 
10
10
  class StatisticalResult:
@@ -40,16 +40,16 @@ class StatisticalResult:
40
40
 
41
41
 
42
42
  class KernelProfiler:
43
- """Kernel profiler of Taichi.
43
+ """Kernel profiler of GsTaichi.
44
44
 
45
45
  Kernel profiler acquires kernel profiling records from backend, counts records in Python scope,
46
- and prints the results to the console by :func:`~taichi.profiler.kernel_profiler.KernelProfiler.print_info`.
46
+ and prints the results to the console by :func:`~gstaichi.profiler.kernel_profiler.KernelProfiler.print_info`.
47
47
 
48
48
  ``KernelProfiler`` now support detailed low-level performance metrics (such as memory bandwidth consumption) in its advanced mode.
49
49
  This mode is only available for the CUDA backend with CUPTI toolkit, i.e. you need ``ti.init(kernel_profiler=True, arch=ti.cuda)``.
50
50
 
51
51
  Note:
52
- For details about using CUPTI in Taichi, please visit https://docs.taichi-lang.org/docs/profiler#advanced-mode.
52
+ For details about using CUPTI in GsTaichi, please visit https://docs.taichi-lang.org/docs/profiler#advanced-mode.
53
53
  """
54
54
 
55
55
  def __init__(self):
@@ -63,14 +63,14 @@ class KernelProfiler:
63
63
  # public methods
64
64
 
65
65
  def set_kernel_profiler_mode(self, mode=False):
66
- """Turn on or off :class:`~taichi.profiler.kernel_profiler.KernelProfiler`."""
66
+ """Turn on or off :class:`~gstaichi.profiler.kernel_profiler.KernelProfiler`."""
67
67
  if type(mode) is bool:
68
68
  self._profiling_mode = mode
69
69
  else:
70
70
  raise TypeError(f"Arg `mode` must be of type boolean. Type {type(mode)} is not supported.")
71
71
 
72
72
  def get_kernel_profiler_mode(self):
73
- """Get status of :class:`~taichi.profiler.kernel_profiler.KernelProfiler`."""
73
+ """Get status of :class:`~gstaichi.profiler.kernel_profiler.KernelProfiler`."""
74
74
  return self._profiling_mode
75
75
 
76
76
  def set_toolkit(self, toolkit_name="default"):
@@ -98,7 +98,7 @@ class KernelProfiler:
98
98
  return self._total_time_ms / 1000 # ms to s
99
99
 
100
100
  def clear_info(self):
101
- """Clear all records both in front-end :class:`~taichi.profiler.kernel_profiler.KernelProfiler` and back-end instance ``KernelProfilerBase``.
101
+ """Clear all records both in front-end :class:`~gstaichi.profiler.kernel_profiler.KernelProfiler` and back-end instance ``KernelProfilerBase``.
102
102
 
103
103
  Note:
104
104
  The values of ``self._profiling_mode`` and ``self._metric_list`` will not be cleared.
@@ -114,7 +114,7 @@ class KernelProfiler:
114
114
  return None
115
115
 
116
116
  def query_info(self, name):
117
- """For docstring of this function, see :func:`~taichi.profiler.query_kernel_profiler_info`."""
117
+ """For docstring of this function, see :func:`~gstaichi.profiler.query_kernel_profiler_info`."""
118
118
  if self._check_not_turned_on_with_warning_message():
119
119
  return None
120
120
  self._update_records() # kernel records
@@ -123,7 +123,7 @@ class KernelProfiler:
123
123
  return impl.get_runtime().prog.query_kernel_profile_info(name)
124
124
 
125
125
  def set_metrics(self, metric_list=default_cupti_metrics):
126
- """For docstring of this function, see :func:`~taichi.profiler.set_kernel_profiler_metrics`."""
126
+ """For docstring of this function, see :func:`~gstaichi.profiler.set_kernel_profiler_metrics`."""
127
127
  if self._check_not_turned_on_with_warning_message():
128
128
  return None
129
129
  self._metric_list = metric_list
@@ -137,7 +137,7 @@ class KernelProfiler:
137
137
  def collect_metrics_in_context(self, metric_list=default_cupti_metrics):
138
138
  """This function is not exposed to user now.
139
139
 
140
- For usage of this function, see :func:`~taichi.profiler.collect_kernel_profiler_metrics`.
140
+ For usage of this function, see :func:`~gstaichi.profiler.collect_kernel_profiler_metrics`.
141
141
  """
142
142
  if self._check_not_turned_on_with_warning_message():
143
143
  return None
@@ -148,13 +148,13 @@ class KernelProfiler:
148
148
  return None
149
149
 
150
150
  # mode of print_info
151
- COUNT = "count" # print the statistical results (min,max,avg time) of Taichi kernels.
152
- TRACE = "trace" # print the records of launched Taichi kernels with specific profiling metrics (time, memory load/store and core utilization etc.)
151
+ COUNT = "count" # print the statistical results (min,max,avg time) of GsTaichi kernels.
152
+ TRACE = "trace" # print the records of launched GsTaichi kernels with specific profiling metrics (time, memory load/store and core utilization etc.)
153
153
 
154
154
  def print_info(self, mode=COUNT):
155
- """Print the profiling results of Taichi kernels.
155
+ """Print the profiling results of GsTaichi kernels.
156
156
 
157
- For usage of this function, see :func:`~taichi.profiler.print_kernel_profiler_info`.
157
+ For usage of this function, see :func:`~gstaichi.profiler.print_kernel_profiler_info`.
158
158
 
159
159
  Args:
160
160
  mode (str): the way to print profiling results.
@@ -183,7 +183,7 @@ class KernelProfiler:
183
183
  return False
184
184
 
185
185
  def _clear_frontend(self):
186
- """Clear member variables in :class:`~taichi.profiler.kernel_profiler.KernelProfiler`.
186
+ """Clear member variables in :class:`~gstaichi.profiler.kernel_profiler.KernelProfiler`.
187
187
 
188
188
  Note:
189
189
  The values of ``self._profiling_mode`` and ``self._metric_list`` will not be cleared.
@@ -340,7 +340,7 @@ _ti_kernel_profiler = KernelProfiler()
340
340
 
341
341
 
342
342
  def get_default_kernel_profiler():
343
- """We have only one :class:`~taichi.profiler.kernelprofiler.KernelProfiler` instance(i.e. ``_ti_kernel_profiler``) now.
343
+ """We have only one :class:`~gstaichi.profiler.kernelprofiler.KernelProfiler` instance(i.e. ``_ti_kernel_profiler``) now.
344
344
 
345
345
  For ``KernelProfiler`` using ``CuptiToolkit``, GPU devices can only work in a certain configuration.
346
346
  Profiling mode and metrics are configured by the host(CPU) via CUPTI APIs, and device(GPU) will use
@@ -353,7 +353,7 @@ def get_default_kernel_profiler():
353
353
 
354
354
 
355
355
  def print_kernel_profiler_info(mode="count"):
356
- """Print the profiling results of Taichi kernels.
356
+ """Print the profiling results of GsTaichi kernels.
357
357
 
358
358
  To enable this profiler, set ``kernel_profiler=True`` in ``ti.init()``.
359
359
  ``'count'`` mode: print the statistics (min,max,avg time) of launched kernels,
@@ -365,7 +365,7 @@ def print_kernel_profiler_info(mode="count"):
365
365
 
366
366
  Example::
367
367
 
368
- >>> import taichi as ti
368
+ >>> import gstaichi as ti
369
369
 
370
370
  >>> ti.init(ti.cpu, kernel_profiler=True)
371
371
  >>> var = ti.field(ti.f32, shape=1)
@@ -382,9 +382,6 @@ def print_kernel_profiler_info(mode="count"):
382
382
  >>> ti.profiler.print_kernel_profiler_info('trace')
383
383
 
384
384
  Note:
385
- Currently the result of `KernelProfiler` could be incorrect on OpenGL
386
- backend due to its lack of support for `ti.sync()`.
387
-
388
385
  For advanced mode of `KernelProfiler`, please visit https://docs.taichi-lang.org/docs/profiler#advanced-mode.
389
386
  """
390
387
  get_default_kernel_profiler().print_info(mode)
@@ -403,7 +400,7 @@ def query_kernel_profiler_info(name):
403
400
 
404
401
  Example::
405
402
 
406
- >>> import taichi as ti
403
+ >>> import gstaichi as ti
407
404
 
408
405
  >>> ti.init(ti.cpu, kernel_profiler=True)
409
406
  >>> n = 1024*1024
@@ -427,9 +424,6 @@ def query_kernel_profiler_info(name):
427
424
  Note:
428
425
  [1] To get the correct result, query_kernel_profiler_info() must be used in conjunction with
429
426
  clear_kernel_profiler_info().
430
-
431
- [2] Currently the result of `KernelProfiler` could be incorrect on OpenGL
432
- backend due to its lack of support for `ti.sync()`.
433
427
  """
434
428
  return get_default_kernel_profiler().query_info(name)
435
429
 
@@ -461,7 +455,7 @@ def set_kernel_profiler_toolkit(toolkit_name="default"):
461
455
 
462
456
  Example::
463
457
 
464
- >>> import taichi as ti
458
+ >>> import gstaichi as ti
465
459
 
466
460
  >>> ti.init(arch=ti.cuda, kernel_profiler=True)
467
461
  >>> x = ti.field(ti.f32, shape=1024*1024)
@@ -488,11 +482,11 @@ def set_kernel_profiler_metrics(metric_list=default_cupti_metrics):
488
482
  """Set metrics that will be collected by the CUPTI toolkit.
489
483
 
490
484
  Args:
491
- metric_list (list): a list of :class:`~taichi.profiler.CuptiMetric()` instances, default value: :data:`~taichi.profiler.kernel_metrics.default_cupti_metrics`.
485
+ metric_list (list): a list of :class:`~gstaichi.profiler.CuptiMetric()` instances, default value: :data:`~gstaichi.profiler.kernel_metrics.default_cupti_metrics`.
492
486
 
493
487
  Example::
494
488
 
495
- >>> import taichi as ti
489
+ >>> import gstaichi as ti
496
490
 
497
491
  >>> ti.init(kernel_profiler=True, arch=ti.cuda)
498
492
  >>> ti.profiler.set_kernel_profiler_toolkit('cupti')
@@ -507,9 +501,9 @@ def set_kernel_profiler_metrics(metric_list=default_cupti_metrics):
507
501
  >>> for i in x:
508
502
  >>> y[None] += x[i]
509
503
 
510
- >>> # In the case of not parameter, Taichi will print its pre-defined metrics list
504
+ >>> # In the case of not parameter, GsTaichi will print its pre-defined metrics list
511
505
  >>> ti.profiler.get_predefined_cupti_metrics()
512
- >>> # get Taichi pre-defined metrics
506
+ >>> # get GsTaichi pre-defined metrics
513
507
  >>> profiling_metrics = ti.profiler.get_predefined_cupti_metrics('shared_access')
514
508
 
515
509
  >>> global_op_atom = ti.profiler.CuptiMetric(
@@ -536,11 +530,11 @@ def collect_kernel_profiler_metrics(metric_list=default_cupti_metrics):
536
530
  """Set temporary metrics that will be collected by the CUPTI toolkit within this context.
537
531
 
538
532
  Args:
539
- metric_list (list): a list of :class:`~taichi.profiler.CuptiMetric()` instances, default value: :data:`~taichi.profiler.kernel_metrics.default_cupti_metrics`.
533
+ metric_list (list): a list of :class:`~gstaichi.profiler.CuptiMetric()` instances, default value: :data:`~gstaichi.profiler.kernel_metrics.default_cupti_metrics`.
540
534
 
541
535
  Example::
542
536
 
543
- >>> import taichi as ti
537
+ >>> import gstaichi as ti
544
538
 
545
539
  >>> ti.init(kernel_profiler=True, arch=ti.cuda)
546
540
  >>> ti.profiler.set_kernel_profiler_toolkit('cupti')
@@ -555,9 +549,9 @@ def collect_kernel_profiler_metrics(metric_list=default_cupti_metrics):
555
549
  >>> for i in x:
556
550
  >>> y[None] += x[i]
557
551
 
558
- >>> # In the case of not parameter, Taichi will print its pre-defined metrics list
552
+ >>> # In the case of not parameter, GsTaichi will print its pre-defined metrics list
559
553
  >>> ti.profiler.get_predefined_cupti_metrics()
560
- >>> # get Taichi pre-defined metrics
554
+ >>> # get GsTaichi pre-defined metrics
561
555
  >>> profiling_metrics = ti.profiler.get_predefined_cupti_metrics('device_utilization')
562
556
 
563
557
  >>> global_op_atom = ti.profiler.CuptiMetric(
@@ -1,6 +1,6 @@
1
1
  # type: ignore
2
2
 
3
- from taichi.lang.impl import get_runtime
3
+ from gstaichi.lang.impl import get_runtime
4
4
 
5
5
 
6
6
  def print_memory_profiler_info():
@@ -1,6 +1,6 @@
1
1
  # type: ignore
2
2
 
3
- from taichi._lib import core as _ti_core
3
+ from gstaichi._lib import core as _ti_core
4
4
 
5
5
 
6
6
  def print_scoped_profiler_info():
@@ -12,7 +12,7 @@ def print_scoped_profiler_info():
12
12
 
13
13
  Example::
14
14
 
15
- >>> import taichi as ti
15
+ >>> import gstaichi as ti
16
16
  >>> ti.init(arch=ti.cpu)
17
17
  >>> var = ti.field(ti.f32, shape=1)
18
18
  >>> @ti.kernel