Skip to content

Commit 258b777

Browse files
manuelcandalesfacebook-github-bot
authored andcommitted
Update test build instructions in kernels readme
Differential Revision: D72420611
1 parent e9c2315 commit 258b777

File tree

1 file changed

+3
-22
lines changed

1 file changed

+3
-22
lines changed

kernels/README.md

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ Check out how it uses helper macros like `ET_CHECK_SAME_SHAPE_AND_DTYPE` and
346346

347347
Once you have your operator and corresponding tests in place, we can try it out.
348348

349-
1. Build ExecuTorch.
349+
1. Build ExecuTorch with `-DEXECUTORCH_BUILD_TESTS=ON`:
350350
```
351351
cmake . \
352352
-DCMAKE_INSTALL_PREFIX=cmake-out \
@@ -359,31 +359,12 @@ cmake . \
359359
-DEXECUTORCH_BUILD_DEVTOOLS=ON \
360360
-DEXECUTORCH_BUILD_VULKAN=OFF \
361361
-DEXECUTORCH_BUILD_XNNPACK=ON \
362+
-DEXECUTORCH_BUILD_TESTS=ON \
362363
-Bcmake-out
363364
364365
cmake --build cmake-out -j9 --target install
365366
```
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.
367+
2. Run tests. You should see your test here.
387368
```
388369
./cmake-out/kernels/test/portable_kernels_test
389370
./cmake-out/kernels/test/optimized_kernels_test

0 commit comments

Comments
 (0)