-
Notifications
You must be signed in to change notification settings - Fork 86
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
[tensor subclass] print type_string of tensor attributes #1592
Open
crcrpar
wants to merge
12
commits into
subclass/check_tensor_attrs
Choose a base branch
from
subclass_tensor-type-str
base: subclass/check_tensor_attrs
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0931c59
to
4a16355
Compare
1069c05
to
edfd224
Compare
8435406 would fix this. |
4a16355
to
de00edd
Compare
edfd224
to
8e6d110
Compare
70bb2f2
to
07a96d6
Compare
Signed-off-by: Masaki Kozuki <[email protected]>
Signed-off-by: Masaki Kozuki <[email protected]>
Signed-off-by: Masaki Kozuki <[email protected]>
to support `__torch_dispatch__`. Since it extends the behavior that is implemented in C++ level, we'd need to apply the transform to split forward and backward traces separately. Signed-off-by: Masaki Kozuki <[email protected]>
for more information, see https://pre-commit.ci
Signed-off-by: Masaki Kozuki <[email protected]>
to support `__torch_dispatch__`. Since it extends the behavior that is implemented in C++ level, we'd need to apply the transform to split forward and backward traces separately. Signed-off-by: Masaki Kozuki <[email protected]>
- Add `scaled_mm` - Change how the lookaside of `torch.autograd.Function.apply` applies dce taking the failure of apex fused rms norm into consideration. ```python @torch.no_grad() @no_autocast def FusedRMSNormAffineMixedDtypesFunction(t_0, t_1, tup11, f12, b13): # /usr/local/lib/python3.12/dist-packages/apex/normalization/fused_layer_norm.py:128: weight_ = weight.contiguous() # t_0: "cuda:0 f32[4, 5, 3, 2]" # t_1: "cuda:0 f32[3, 2]" # /usr/local/lib/python3.12/dist-packages/apex/normalization/fused_layer_norm.py:127: input_ = input.contiguous() t5 = ltorch.contiguous(t_0, memory_format=_torch_memory_format_0) # t5: "cuda:0 f32[4, 5, 3, 2]" # t5 = prims.stride_order(t_0, (3, 2, 1, 0)) # t5: "cuda:0 f32[4, 5, 3, 2]" # /usr/local/lib/python3.12/dist-packages/apex/normalization/fused_layer_norm.py:128: weight_ = weight.contiguous() t6 = ltorch.contiguous(t_1, memory_format=_torch_memory_format_0) # t6: "cuda:0 f32[3, 2]" # t6 = prims.stride_order(t_1, (1, 0)) # t6: "cuda:0 f32[3, 2]" (t10, t9) = apex_fused_rms_norm_forward_affine_mixed_dtypes(t5, (3, 2), t6, 1e-05) return t10 ``` For this trace, `thunder.core.transforms.dce` replaces `t9` with `_` then the augmented forward trace would lose the access to it. So by reusing the augmented forward trace in the basic forward trace, `dce` would not do so. Signed-off-by: Masaki Kozuki <[email protected]>
also use `pytorch_executor` in the `transform_for_execution` of `prologue_trace` as it could have the prim of tensor subclass flattening whose definition is only available in pytorch executor. Signed-off-by: Masaki Kozuki <[email protected]>
Signed-off-by: Masaki Kozuki <[email protected]>
for more information, see https://pre-commit.ci Signed-off-by: Masaki Kozuki <[email protected]>
for more information, see https://pre-commit.ci
07a96d6
to
9f0a8ef
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
as per title.