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
Env:
pjnl-20241127 and this PR
nvfuser 0.2.23+git4c2ea06
When use 30 or more layers of linear+relu, the nvFusion0 becomes slow, so the notebook runs out of time
Here is the repro script using Thunder (nv_enable_linear=True, it takes about 219s; nv_enable_linear=False, it takes about 8s)
import torch
import thunder
class MySimpleModel(torch.nn.Module):
def __init__(self, n_layers=10):
super().__init__()
self.fcs = torch.nn.ModuleList([torch.nn.Linear(16, 16) for _ in range(n_layers)])
def forward(self, x):
for fc in self.fcs:
x = torch.nn.functional.relu(fc(x))
return x
def get_model_and_args():
device = 'cuda'
model = MySimpleModel(n_layers=30).to(device)
args = (torch.randn(128, 16, device=device),)
kwargs = {}
return model, args, kwargs
model, args, kwargs = get_model_and_args()
# Check against the vanilla `thunder.jit` model
jfun = thunder.jit(model, nv_enable_linear=True)
import time
st=time.time()
expected = jfun(*args, **kwargs)
print("time:", time.time()-st)
Originally posted by @kiya00 in #1371 (comment)
Env:
pjnl-20241127 and this PR
nvfuser 0.2.23+git4c2ea06
When use 30 or more layers of linear+relu, the nvFusion0 becomes slow, so the notebook runs out of time
Here is the repro script using Thunder (nv_enable_linear=True, it takes about 219s; nv_enable_linear=False, it takes about 8s)
the nvfuser repro script I saved from
lightning-thunder/thunder/executors/nvfuserex_impl.py
Line 452 in fef423b
by
print(fd.repro_script_for(args))
cc: @IvanYashchuk @wujingyue
cc @tfogal
The text was updated successfully, but these errors were encountered: