question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Following pattern in code seems to break dynamo graph tracing

See original GitHub issue
import torch
import torchdynamo

from torch import nn

class TestModel(nn.Module):
    def __init__(self) -> None:
        super().__init__()
        self.linears = nn.Sequential(
            nn.Linear(100, 100),
            nn.Linear(100, 100),
            nn.Linear(100, 100),
            nn.Linear(100, 100),
        )

    def forward(self, x):
        all_but_last, last = self.linears[:-1], self.linears[-1]
        x = all_but_last(x)
        x = last(x)
        return x


# @torchdynamo.optimize('eager')
def toy_example(model, input):
    return model(input)

model = TestModel().cuda()
x = torch.rand((8, 100), device='cuda')

for _ in range(10):
    toy_example(model, x)

Its okay if the answer is, this is not supported but just wanted to raise it as fyi

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
voznesenskymcommented, Oct 17, 2022

@voznesenskym we’re still using the dynamo issue tracker

My mistake. Apologies @ngoyal2707

1reaction
voznesenskymcommented, Oct 17, 2022

gotcha 😃 thanks - can you port this issue to pytorch? Just realized its in dynamo, and this repo is effectively closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setting Rotation along a path - Packages - Dynamo Forum
Below is a quick overview of a method to create an array of family instances on a curve and rotate them to always...
Read more >
Can't place nodes immediately after opening graph, "running ...
I'm trying to figure out how to reinstall Dynamo for Revit 2020 and ... addins folder it seems to break functionality while using...
Read more >
DynamoPrimer-Print1_3.pdf - primer.dynamobim.org
Code in Nodes - How can I start extending Dynamo with my own code? ... In Dynamo, the Graph and the 3D results...
Read more >
How to create custom Dynamo Extensions - teocomi
We'll see how extensions can be used to interact with nodes on the canvas, with the graph itself and with the Dynamo View...
Read more >
Computational BIM Workshop: Beginner Dynamo for Revit
We'll explore how the two tools interface; the basics of building a Dynamo graph; and the logic, form, and structure of graphs—and we'll...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found