Skip to content

[CMake] optimized_kernels and quantized_kernel will depend on portable_kernels. #10677

Closed
@kirklandsign

Description

@kirklandsign

🚀 The feature, motivation and pitch

For example,

ET_KERNEL_CHECK(
ctx,
check_layer_norm_args(
input, normalized_shape, weight, bias, out, mean_out, rstd_out),
InvalidArgument,
ret_val);

here it uses check_layer_norm_args, and it's defined in
bool check_layer_norm_args(
const Tensor& in,
IntArrayRef normalized_shape,
const executorch::aten::optional<Tensor>& weight,
const executorch::aten::optional<Tensor>& bias,
Tensor& out,
Tensor& mean_out,
Tensor& rstd_out) {
size_t ndim = normalized_shape.size();
ET_CHECK_OR_RETURN_FALSE(

So it means
Either optimized_kernels/quantized_kernel depends on portable_kernels privately, or we split these helpers into its own lib.

Right now, it depends on user of optimized_kernels to pull in portable_kernels as well, so it's "it happens to work"

Alternatives

No response

Additional context

No response

RFC (Optional)

No response

cc @larryliu0820 @jathu

Metadata

Metadata

Labels

module: build/installIssues related to the cmake and buck2 builds, and to installing ExecuTorch

Type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions