Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions kernels/quantized/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ def define_common_targets():
define_static_targets = True,
)

# On Windows we can only compile these two ops currently, so adding a
# separate target for this.
et_operator_library(
name = "q_dq_ops",
ops = [
"quantized_decomposed::dequantize_per_tensor.out",
"quantized_decomposed::dequantize_per_tensor.Tensor_out",
],
)

for aten_mode in (True, False):
aten_suffix = "_aten" if aten_mode else ""

Expand Down Expand Up @@ -92,6 +102,25 @@ def define_common_targets():
define_static_targets = True,
)

# On Windows we can only compile these two ops currently, so adding a
# separate target for this.
executorch_generated_lib(
name = "q_dq_ops_generated_lib" + aten_suffix,
custom_ops_yaml_target = ":quantized.yaml",
kernel_deps = [
"//executorch/kernels/quantized/cpu:op_quantize" + aten_suffix,
"//executorch/kernels/quantized/cpu:op_dequantize" + aten_suffix,
],
aten_mode = aten_mode,
deps = [
":q_dq_ops",
],
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
)

runtime.python_library(
name = "quantized_ops_lib",
srcs = ["__init__.py"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def define_op_library(name, deps, android_deps, aten_target, _allow_third_party_
],
visibility = [
"//executorch/kernels/portable/test/...",
"//executorch/kernels/quantized/test/...",
"//executorch/kernels/quantized/...",
"//executorch/kernels/optimized/test/...",
"//executorch/kernels/test/...",
"@EXECUTORCH_CLIENTS",
Expand Down
Loading