Skip to content

Commit 89f9b71

Browse files
committed
Build optimized library with CMake
1 parent faff2e1 commit 89f9b71

File tree

2 files changed

+75
-2
lines changed

2 files changed

+75
-2
lines changed

kernels/optimized/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ include(${EXECUTORCH_ROOT}/build/Codegen.cmake)
3939

4040
# Generate C++ bindings to register kernels into both PyTorch (for AOT) and
4141
# Executorch (for runtime). Here select all ops in optimized.yaml
42-
set(_yaml "${CMAKE_CURRENT_LIST_DIR}/optimized.yaml")
42+
set(_yaml "${CMAKE_CURRENT_LIST_DIR}/optimized-oss.yaml")
4343
gen_selected_ops("${_yaml}" "" "")
4444

45-
generate_bindings_for_kernels(${CMAKE_CURRENT_SOURCE_DIR}/optimized.yaml "")
45+
generate_bindings_for_kernels(${CMAKE_CURRENT_SOURCE_DIR}/optimized-oss.yaml "")
4646
message("Generated files ${gen_command_sources}")
4747

4848
list(TRANSFORM _optimized_kernels__srcs PREPEND "${EXECUTORCH_ROOT}/")

kernels/optimized/optimized-oss.yaml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Copyright (c) Meta Platforms, Inc. and affiliates.
2+
#
3+
# This yaml file contains operators that have optimized kernels available.
4+
5+
- op: add.out
6+
kernels:
7+
- arg_meta: null
8+
kernel_name: torch::executor::opt_add_out
9+
10+
- op: add.Scalar_out
11+
kernels:
12+
- arg_meta: null
13+
kernel_name: torch::executor::opt_add_scalar_out
14+
15+
- op: bmm.out
16+
kernels:
17+
- arg_meta: null
18+
kernel_name: torch::executor::opt_bmm_out
19+
20+
- op: div.out
21+
kernels:
22+
- arg_meta: null
23+
kernel_name: torch::executor::opt_div_out
24+
25+
- op: div.Scalar_out
26+
kernels:
27+
- arg_meta: null
28+
kernel_name: torch::executor::opt_div_scalar_out
29+
30+
- op: exp.out
31+
kernels:
32+
- arg_meta: null
33+
kernel_name: torch::executor::opt_exp_out
34+
35+
- op: le.Scalar_out
36+
kernels:
37+
- arg_meta: null
38+
kernel_name: torch::executor::opt_le_scalar_out
39+
40+
- op: le.Tensor_out
41+
kernels:
42+
- arg_meta: null
43+
kernel_name: torch::executor::opt_le_tensor_out
44+
45+
- op: mul.out
46+
kernels:
47+
- arg_meta: null
48+
kernel_name: torch::executor::opt_mul_out
49+
50+
- op: mul.Scalar_out
51+
kernels:
52+
- arg_meta: null
53+
kernel_name: torch::executor::opt_mul_scalar_out
54+
55+
- op: native_layer_norm.out
56+
kernels:
57+
- arg_meta: null
58+
kernel_name: torch::executor::opt_native_layer_norm_out
59+
60+
- op: neg.out
61+
kernels:
62+
- arg_meta: null
63+
kernel_name: torch::executor::opt_neg_out
64+
65+
- op: sub.out
66+
kernels:
67+
- arg_meta: null
68+
kernel_name: torch::executor::opt_sub_out
69+
70+
- op: sub.Scalar_out
71+
kernels:
72+
- arg_meta: null
73+
kernel_name: torch::executor::opt_sub_scalar_out

0 commit comments

Comments
 (0)