Skip to content

Commit

Permalink
utility to generate bytecode from template function (#127359)
Browse files Browse the repository at this point in the history
Summary:
This will be helpful in reducing some of the hardcoded and python-version-dependent bytecode generation in various places in dynamo - e.g. resume function generation and object reconstruction.

X-link: pytorch/pytorch#127359
Approved by: https://github.com/jansel
ghstack dependencies: #127329

Reviewed By: izaitsevfb

Differential Revision: D58015503

Pulled By: williamwen42

fbshipit-source-id: efdf8394aaa34c4e3297dcd632cc61566b9b70d1
  • Loading branch information
williamwen42 authored and facebook-github-bot committed Jun 1, 2024
1 parent 324b747 commit d54ca9f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions userbenchmark/dynamo/dynamobench/_dynamo/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,12 @@ def skipIfNotPy311(fn):
return unittest.skip(fn)


def skipIfNotPy312(fn):
if sys.version_info >= (3, 12):
return fn
return unittest.skip(fn)


def xfailIfPy312(fn):
if sys.version_info >= (3, 12):
return unittest.expectedFailure(fn)
Expand Down

0 comments on commit d54ca9f

Please sign in to comment.