Enable torch._refs.var for nvFuser executor#79517
Enable torch._refs.var for nvFuser executor#79517IvanYashchuk wants to merge 2 commits intopytorch:masterfrom
Conversation
Add variance with correction argument to nvFuser Expose "var" function to Python API Add manual test for prims.var with nvfuser executor
🔗 Helpful links
✅ No Failures (0 Pending)As of commit 2afe2fa (more details on the Dr. CI page): Expand to see more💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
mruberry
left a comment
There was a problem hiding this comment.
Stamp from the Meta side
jjsjann123
left a comment
There was a problem hiding this comment.
LGTM.
Nitpick on the title of the PR, looks like the nvfuser implementation is added for torch._prims.var instead of _refs.
|
Right, |
|
@pytorchbot merge -g |
|
@pytorchbot successfully started a merge job. Check the current status here |
|
Hey @IvanYashchuk. |
Summary:
This PR adds variance function with correction argument to nvFuser.
Now it's possible to run
```py
import torch
import torch._refs
from torch._prims.executor import make_traced
def foo1(a):
return torch._refs.var(a, keepdim=False, unbiased=False)
def foo2(a):
return torch._refs.var(a, keepdim=False, correction=2)
a = torch.randn(3, 3, device='cuda')
make_traced(foo1)(a, executor="nvfuser")
make_traced(foo2)(a, executor="nvfuser")
```
Pull Request resolved: #79517
Approved by: https://github.com/mruberry, https://github.com/jjsjann123
Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/e10b762537214ad152724d772b72b17a4448f145
Reviewed By: malfet
Differential Revision: D37208278
Pulled By: malfet
fbshipit-source-id: 0bda2f5e6c41d73673c23e749cf5836bc4619895
This PR adds variance function with correction argument to nvFuser.
Now it's possible to run
```py
import torch
import torch._refs
from torch._prims.executor import make_traced
def foo1(a):
return torch._refs.var(a, keepdim=False, unbiased=False)
def foo2(a):
return torch._refs.var(a, keepdim=False, correction=2)
a = torch.randn(3, 3, device='cuda')
make_traced(foo1)(a, executor="nvfuser")
make_traced(foo2)(a, executor="nvfuser")
```
Pull Request resolved: pytorch/pytorch#79517
Approved by: https://github.com/mruberry, https://github.com/jjsjann123
This PR adds variance function with correction argument to nvFuser.
Now it's possible to run
```py
import torch
import torch._refs
from torch._prims.executor import make_traced
def foo1(a):
return torch._refs.var(a, keepdim=False, unbiased=False)
def foo2(a):
return torch._refs.var(a, keepdim=False, correction=2)
a = torch.randn(3, 3, device='cuda')
make_traced(foo1)(a, executor="nvfuser")
make_traced(foo2)(a, executor="nvfuser")
```
Pull Request resolved: pytorch/pytorch#79517
Approved by: https://github.com/mruberry, https://github.com/jjsjann123
This PR adds variance function with correction argument to nvFuser.
Now it's possible to run
```py
import torch
import torch._refs
from torch._prims.executor import make_traced
def foo1(a):
return torch._refs.var(a, keepdim=False, unbiased=False)
def foo2(a):
return torch._refs.var(a, keepdim=False, correction=2)
a = torch.randn(3, 3, device='cuda')
make_traced(foo1)(a, executor="nvfuser")
make_traced(foo2)(a, executor="nvfuser")
```
Pull Request resolved: pytorch#79517
Approved by: https://github.com/mruberry, https://github.com/jjsjann123
This PR adds variance function with correction argument to nvFuser.
Now it's possible to run