Skip to content

Commit

Permalink
Load _C ops before registering meta implementations (#8470)
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasHug authored Jun 6, 2024
1 parent bcf6cda commit a839642
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions torchvision/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
from modulefinder import Module

import torch
from torchvision import _meta_registrations, datasets, io, models, ops, transforms, utils

from .extension import _HAS_OPS
# Don't re-order these, we need to load the _C extension (done when importing
# .extensions) before entering _meta_registrations.
from .extension import _HAS_OPS # usort:skip
from torchvision import _meta_registrations, datasets, io, models, ops, transforms, utils # usort:skip

try:
from .version import __version__ # noqa: F401
Expand Down

0 comments on commit a839642

Please sign in to comment.