Skip to content

Commit 20135a6

Browse files
committed
Update on "[kernel] Add template based unboxing"
Adding a new feature to allow users to bypass codegen and register their kernels directly. This is very useful for custom kernels for custom ops. Example usage: ``` Tensor& my_op(RuntimeContext& ctx, const Tensor& self, const Tensor& other, Tensor& out) { // ... return out; } Kernel my_kernel = Kernel.make_boxed_kernel("my_ns::my_op",EXECUTORCH_FN(my_op)); register_kernels({my_kernel}); ``` Differential Revision: [D51553099](https://our.internmc.facebook.com/intern/diff/D51553099) [ghstack-poisoned]
2 parents 5ba13cc + 705f89b commit 20135a6

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

extension/kernel_util/meta_programming.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* This source code is licensed under the BSD-style license found in the
66
* LICENSE file in the root directory of this source tree.
77
*/
8+
9+
810
#pragma once
911
#if __cplusplus < 201703L
1012
#error "This header requires C++17"

extension/kernel_util/test/targets.bzl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
2-
load("@fbsource//xplat/executorch/codegen:codegen.bzl", "et_operator_library", "executorch_generated_lib")
32

43
def define_common_targets():
54
"""Defines targets that should be shared between fbcode and xplat.

0 commit comments

Comments
 (0)