Skip to content

Commit 2c558a1

Browse files
Andrew Grebenisanfacebook-github-bot
authored andcommitted
Fix OSS import for ref_implementations
Summary: Was using buck-based loading of quantized decomposed in ref_implementations which isn't CMake-compatible. This fixes that approach. Differential Revision: D88303133
1 parent aea2784 commit 2c558a1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

backends/cadence/aot/TARGETS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ runtime.python_library(
131131
deps = [
132132
"fbcode//caffe2:torch",
133133
"fbcode//executorch/exir:scalar_type",
134-
"fbcode//executorch/kernels/quantized:custom_ops_generated_lib",
134+
"fbcode//executorch/kernels/quantized:quantized_ops_lib",
135135
],
136136
)
137137

backends/cadence/aot/ref_implementations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88

99
from typing import Callable, Protocol, TypeVar
1010

11+
import executorch.kernels.quantized # noqa: F401 # Loads quantized ops library
12+
1113
import torch
1214
import torch.nn as nn
1315
import torch.nn.functional as F
14-
1516
from executorch.exir.scalar_type import ScalarType
1617
from torch.library import impl, Library
1718

1819
m = Library("cadence", "IMPL", "CompositeExplicitAutograd")
19-
torch.ops.load_library("//executorch/kernels/quantized:custom_ops_generated_lib")
2020

2121
# Registry to track all ops with reference implementations
2222
_REGISTERED_REF_IMPLEMENTATIONS: set[str] = set()

0 commit comments

Comments
 (0)