| load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") |
| load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") |
| load(":targets.bzl", "define_common_targets") |
| |
| oncall("executorch") |
| |
| define_common_targets() |
| |
| python_unittest( |
| name = "test_out_variants", |
| srcs = ["test_out_variants.py"], |
| preload_deps = [ |
| "//executorch/kernels/quantized:custom_ops_generated_lib", |
| ], |
| deps = [ |
| "//caffe2:torch", |
| "//executorch/exir/dialects:lib", |
| "//executorch/exir/passes:quant_fusion_pass", |
| "//executorch/kernels/quantized:quantized_ops_lib", |
| ], |
| ) |
| |
| runtime.cxx_library( |
| name = "quantized_ops_for_test_lib", |
| srcs = [ |
| "quantized_ops_aot_register.cpp", |
| ], |
| visibility = [ |
| "//executorch/...", |
| "@EXECUTORCH_CLIENTS", |
| ], |
| deps = [ |
| "//executorch/extension/aten_util:aten_bridge", |
| "//executorch/kernels/quantized/cpu:op_dequantize", |
| "//executorch/kernels/quantized/cpu:op_quantize", |
| "//executorch/runtime/core/exec_aten:lib", |
| ], |
| external_deps = [ |
| "libtorch", |
| ], |
| ) |
| |
| python_unittest( |
| name = "test_quant_dequant_per_token", |
| srcs = [ |
| "test_quant_dequant_per_token.py", |
| ], |
| preload_deps = [ |
| ":quantized_ops_for_test_lib", |
| ], |
| deps = [ |
| "//caffe2:torch", |
| ], |
| ) |