-
Notifications
You must be signed in to change notification settings - Fork 122
[Diffusion] add TorchCompileTransformation #913
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
base: main
Are you sure you want to change the base?
Conversation
| -1, | ||
| _users=2, # The cat feeds both slices | ||
| ) | ||
| slice_hi = CallFunction(aten.slice.Tensor, inner_cat, 1, split_idx, 9223372036854775807) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does 9223372036854775807 mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't quite understand why it has to be written this way. Why not just write -1 directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't dig into it. Maybe it has something to do with how aten.slice represent end of the dim
| previous = torch._inductor.config.post_grad_custom_post_pass | ||
|
|
||
| if not pass_manager.empty(): | ||
| torch._inductor.config.post_grad_custom_post_pass = pass_manager |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should consider the four situations: pre_forward, post_forward, pre_backward, and post_backward, rather than just post_backward alone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, let me check the torch api
PR Category
Inference
PR Types
New Features
PR Description
TorchCompileTransformation1.1 Apply torch.compile on target module
1.2 A backend wrapper to support custom passes
TimestepEmbeddingFlipSineCosinePass) to test the custom pass functionality