You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
Introduces a new tlx.size_of() utility function that returns the size in bytes of a given Triton dtype. This helps unify kernels through different dtypes.
Pull Request resolved: #710
Reviewed By: dshi7
Differential Revision: D88204044
Pulled By: htyu
fbshipit-source-id: 13b9ba652619956808989aca75ab1d48fa78fb53
Copy file name to clipboardExpand all lines: README.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -221,6 +221,24 @@ Examples: how mbarriers are communicated in warp specialization
221
221
222
222
Returns the id of the current thread instance along the given `axis`.
223
223
224
+
-`tlx.dtype_of(v)`
225
+
226
+
Returns the dtype of a tensor or tensor descriptor.
227
+
228
+
-`tlx.size_of(dtype)`
229
+
230
+
Returns the size in bytes of a given Triton dtype. This is useful for dynamically computing memory sizes based on dtype, especially in barrier synchronization code.
0 commit comments