Git Product home page Git Product logo

Comments (2)

guilhermeleobas avatar guilhermeleobas commented on July 18, 2024

Fixing this bug reveals a limitation in aot_autograd as the example_value is a BatchedTensor:

torch/_subclasses/fake_tensor.py:1153: in _cached_dispatch_impl
    output = self._dispatch_impl(func, types, args, kwargs)
torch/_subclasses/fake_tensor.py:1539: in _dispatch_impl
    (flat_args, flat_arg_fake_tensors) = self.validate_and_convert_non_fake_tensors(
torch/_subclasses/fake_tensor.py:1832: in validate_and_convert_non_fake_tensors
    validated_args = [validate(a) for a in flat_args]
torch/_subclasses/fake_tensor.py:1832: in <listcomp>
    validated_args = [validate(a) for a in flat_args]
torch/_subclasses/fake_tensor.py:1822: in validate
    raise AssertionError(
E   torch._dynamo.exc.BackendCompilerFailed: backend='aot_eager' raised:
E   AssertionError: Please convert all Tensors to FakeTensors first or instantiate FakeTensorMode with 'allow_non_fake_inputs'. Found in aten.sin.default(BatchedTensor(lvl=1, bdim=0, value=
E       FakeTensor(..., size=(3, 4))
E   ))
E
E   While executing %sin : [num_users=1] = call_method[target=sin](args = (%l_x_,), kwargs = {})
E   Original traceback:
E     File "/home/guilhermeleobas/git/pytorch/test/dynamo/test_higher_order_ops.py", line 5290, in wrapped_fn
E       return x.sin()
E

I guess this would need aot_autograd to support functorch tensors?

from pytorch.

zou3519 avatar zou3519 commented on July 18, 2024

I guess this would need aot_autograd to support functorch tensors?

Yes, exactly.

torch._dynamo.exc.Unsupported: torch.func.vmap(fn) requires the function to be inlined by dynamo

The error message is really awkward, is it possible for us to make it better?

from pytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.