@@ -346,7 +346,7 @@ Check out how it uses helper macros like `ET_CHECK_SAME_SHAPE_AND_DTYPE` and
346
346
347
347
Once you have your operator and corresponding tests in place, we can try it out.
348
348
349
- 1 . Build ExecuTorch.
349
+ 1 . Build ExecuTorch with ` -DEXECUTORCH_BUILD_TESTS=ON ` :
350
350
```
351
351
cmake . \
352
352
-DCMAKE_INSTALL_PREFIX=cmake-out \
@@ -355,35 +355,17 @@ cmake . \
355
355
-DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON \
356
356
-DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON \
357
357
-DEXECUTORCH_BUILD_EXTENSION_MODULE=ON \
358
+ -DEXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL=ON \
358
359
-DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON \
359
360
-DEXECUTORCH_BUILD_DEVTOOLS=ON \
360
361
-DEXECUTORCH_BUILD_VULKAN=OFF \
361
362
-DEXECUTORCH_BUILD_XNNPACK=ON \
363
+ -DEXECUTORCH_BUILD_TESTS=ON \
362
364
-Bcmake-out
363
365
364
366
cmake --build cmake-out -j9 --target install
365
367
```
366
- 2 . Build gtest.
367
- ```
368
- mkdir -p third-party/googletest/build
369
- cd third-party/googletest/build
370
- cmake .. -DCMAKE_INSTALL_PREFIX=.
371
- make -j4
372
- make install
373
- cd ../../../
374
- ```
375
-
376
- 3 . Build kernel tests.
377
- ```
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
385
- ```
386
- 4 . Run tests. You should see your test here.
368
+ 2 . Run tests. You should see your test here.
387
369
```
388
370
./cmake-out/kernels/test/portable_kernels_test
389
371
./cmake-out/kernels/test/optimized_kernels_test
0 commit comments