• Home
  • Raw
  • Download

Lines Matching +full:cmake +full:- +full:core

6 - `kernels`: Contains implementations and tests for the operators defined
8 - `kernels/portable/cpu`: Pure C++ implementations of the operators defined in the
10 - `kernels/optimized/cpu`: Optimized C++ implementations of the operators defined in the
12 - `kernels/aten`: A thin wrapper layer to hookup ATen library into ExecuTorch.
13 - `kernels/test`: Tests for all operator implementations. Since all
30 - Make it straightforward to add new operator implementations.
31 - Ensure that the operator implementations are of high quality, and are easy to
33 - Make it easy for users to find available operator implementations, and to
39 the types defined by PyTorch core in the `at` or `c10` namespaces. To retain
43 [`//runtime/core/exec_aten/exec_aten.h`](https://github.com/pytorch/executorch/blob/main/runtime/co…
46 [`//runtime/core/portable_type/`](https://github.com/pytorch/executorch/tree/main/runtime/core/port…
48 The ExecuTorch types are source-compatible with the ATen/c10 types; if you write
60 - [`//kernels/portable/functions.yaml`](https://github.com/pytorch/executorch/blob/main/kernels/por…
61 - Add your entry here if your operator overload (e.g., `op: add.out`)
62 appears in the core pytorch file
64- Also add your entry to [`//kernels/aten/functions.yaml`](https://github.com/pytorch/executorch/b…
65 - [`//kernels/portable/custom_ops.yaml`](https://github.com/pytorch/executorch/blob/main/kernels/po…
66- Add your entry here if your operator overload does *not* appear in the core pytorch `native_func…
76 ExecuTorch only supports out-style operators, where:
77 - The caller provides the output Tensor or Tensor list in the final position
79 - The C++ function modifies and returns the same `out` argument.
80 - If the return type in the YAML file is `()` (which maps to void), the C++
82 - The `out` argument must be keyword-only, which means it needs to follow an
84 - Conventionally, these out operators are named using the pattern `<name>.out`
89 always return `out` when the return type is non-`void`.
99 ExecuTorch does not support all of the argument types that core PyTorch
103 <!-- TODO(dbort): Once that list stablizes, move to a table in this file
104 so that external users can see it. -->
118 - op: add.out
120 - arg_meta: null
126 - op: add.out
132 - arg_meta:
141 - func: allclose.out(Tensor self, Tensor other, float rtol=1e-05, float atol=1e-08, bool equal_nan=…
143 - arg_meta: null
168 - `add.Scalar`
169 - `add.Tensor`
170 - `add.out`
171 - `add_.Tensor`
184 - `./kernels/portable/cpu/op_<name>.cpp`: The implementations of operator overloads
187 - `./kernels/portable/CMakeLists.txt`: The CMake build file for all the
189 - `./kernels/test/op_<name>_test.cpp`: Unit tests for the operator overloads
191 - Note that tests under this directory are for portable kernel specific. To
193 - Note that the tests do not live under `cpu`; tests should be
194 implementation-agnostic. This will let us run the same tests against all
196 - `./kernels/test/CMakeLists.txt`: The CMake build file for all the
201 - [`executorch/kernels/portable/cpu/op_add.cpp`](https://github.com/pytorch/executorch/blob/main/ke…
203 - [`./kernels/portable/CMakeLists.txt`](https://github.com/pytorch/executorch/blob/main/kernels/por…
205 - [`executorch/kernels/portable/test/op_add_test.cpp`](https://github.com/pytorch/executorch/blob/m…
207 - [`./kernels/test/CMakeLists.txt`](https://github.com/pytorch/executorch/blob/main/kernels/test/CM…
214 NOTE: a given `op_<name>` cannot implement both ATen-compatible and
215 non-ATen-compatible (i.e., custom) operators. We suggest adding the suffix
216 `_custom` if necessary: e.g., `op_add` for ATen-compatible overloads of
217 the `add` operator, and `op_add_custom` for non-ATen-compatible overloads.
220 This library is intended to be portable, open-sourceable, and self-contained.
254 cmake -DCMAKE_INSTALL_PREFIX=cmake-out \
255 -DCMAKE_BUILD_TYPE=Release \
256 -DPYTHON_EXECUTABLE=python \
257 -Bcmake-out .
258 cmake --build cmake-out -j9 --target install --config Release
262 cmake-out/kernels/portable/portable_ops_lib/NativeFunctions.h
265 Since this header is generated from the YAML files, re-run the script if you have modified your
300 #include <executorch/runtime/core/exec_aten/exec_aten.h>
301 #include <executorch/runtime/core/exec_aten/testing_util/tensor_factory.h>
302 #include <executorch/runtime/core/exec_aten/testing_util/tensor_util.h>
321 EXPECT_THAT(a, IsCloseTo(b)); // For floating-point tensors
340 - [`executorch/kernels/portable/cpu/op_add.cpp`](https://github.com/pytorch/executorch/blob/main/ke…
341 - [`executorch/kernels/portable/test/op_add_test.cpp`](https://github.com/pytorch/executorch/blob/m…
351 cmake . \
352 -DCMAKE_INSTALL_PREFIX=cmake-out \
353 -DEXECUTORCH_USE_CPP_CODE_COVERAGE=ON \
354 -DEXECUTORCH_BUILD_KERNELS_OPTIMIZED=ON \
355 -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON \
356 -DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON \
357 -DEXECUTORCH_BUILD_EXTENSION_MODULE=ON \
358 -DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON \
359 -DEXECUTORCH_BUILD_DEVTOOLS=ON \
360 -DEXECUTORCH_BUILD_VULKAN=OFF \
361 -DEXECUTORCH_BUILD_XNNPACK=ON \
362 -Bcmake-out
364 cmake --build cmake-out -j9 --target install
368 mkdir -p third-party/googletest/build
369 cd third-party/googletest/build
370 cmake .. -DCMAKE_INSTALL_PREFIX=.
371 make -j4
378 cmake kernels/test \
379 -DCMAKE_BUILD_TYPE=Debug \
380 -DCMAKE_INSTALL_PREFIX=cmake-out \
381 -DEXECUTORCH_USE_CPP_CODE_COVERAGE=ON \
382 -DCMAKE_PREFIX_PATH="$(pwd)/third-party/googletest/build" \
383 -Bcmake-out/kernels/test
384 cmake --build cmake-out/kernels/test -j9
388 ./cmake-out/kernels/test/portable_kernels_test
389 ./cmake-out/kernels/test/optimized_kernels_test
397 - Must not include C++ stdlib headers, or use C++ stdlib types. For example,
400 - Must not dynamically allocate memory, or cause memory to be dynamically
401 allocated. All non-stack memory must be provided as a function parameter by
404 - This includes direct calls to `new`, `malloc`, `realloc`, etc., as well as
407 - Must be stateless.
408 - Must be thread-safe. Note that the ExecuTorch environment does not provide
411 - Must work in an environment without threads. This, along with the stateless
413 - Must not use `stdout`, `stderr`, or other file/stream IO via `printf`/`cout`
415 - Must not use `assert()`. Instead use `ET_CHECK` and other macros from
417 - Must not raise exceptions. Instead use `ET_CHECK` and other macros from
420 Note that not all of these apply to *every* ExecuTorch-compatible operator
423 For example, a target-specfic custom operator that initiates a DMA copy would be
425 target-specific APIs to do so. But, since this library is only for portable
427 target-specific APIs like that.
443 In <kernel>/test/ we can put kernel-specific test cases.
449 - The default value of supported features is in test/supported_features.yaml
450 - Each kernel needs to override its supported features in <kernel>/test/supported_features_def.yaml.
452 - This ensures that all kernels can share the same c++ test case source