11 May 2025 |
Curid |
When cross-compiling, a CMAKE_TOOLCHAIN_FILE should set the CMAKE_SYSTEM_PROCESSOR variable to match target architecture that it specifies (via CMAKE_<LANG>COMPILER and perhaps CMAKE<LANG>_COMPILER_TARGET).
Am I suppose to set it manually?
| 08:05:35 |
Curid | Redacted or Malformed Event | 19:16:46 |
Curid | I finally managed to get tensorflow lite to cross-compile to aarch64 by using cmake instead of bazel: https://paste.debian.net/1374172/ | 19:17:16 |
Curid | should I upstream it? | 19:33:39 |
emily | I don't know if you need those patches? | 19:35:55 |
emily | I'm pretty sure you can point CMake to the right place with flags | 19:36:14 |
emily | or at least inject stuff into the right paths, not sure | 19:36:25 |
12 May 2025 |
Curid | ./tflite_patches/fetch_farmhash.patch
./tflite_patches/fetch_fft2d.patch
- ./tflite_patches/fetch_gemmlowp.patch
+ #./tflite_patches/fetch_gemmlowp.patch
./tflite_patches/fetch_neon2sse.patch
./tflite_patches/fetch_cpuinfo.patch
./tflite_patches/fetch_ruy.patch
@@ -139,11 +139,12 @@ in stdenv.mkDerivation rec {
configurePhase = ''
cmake \
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON \
+ -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=true \
-Dabseil_SOURCE_DIR2=${abseil_src} \
-Deigen_SOURCE_DIR2=$(pwd)/eigen_src \
-Dfarmhash_SOURCE_DIR2=${farmhash_src} \
-Dfft2d_SOURCE_DIR2=${fft2d_src} \
- -Dgemmlowp_SOURCE_DIR2=${gemmlowp_src} \
+ -DFETCHCONTENT_SOURCE_DIR_gemmlowp=${gemmlowp_src} \
-Dneon2sse_SOURCE_DIR2=${neon2sse_src} \
-Dcpuinfo_SOURCE_DIR2=${cpuinfo_src} \
error: could not find git for clone of gemmlowp-populate
| 16:56:59 |
Curid | https://github.com/tensorflow/tensorflow/blob/v2.12.1/tensorflow/lite/tools/cmake/modules/Findgemmlowp.cmake | 16:57:37 |
Curid | * ./tflite_patches/fetch_farmhash.patch
./tflite_patches/fetch_fft2d.patch
- ./tflite_patches/fetch_gemmlowp.patch
+ #./tflite_patches/fetch_gemmlowp.patch
./tflite_patches/fetch_neon2sse.patch
./tflite_patches/fetch_cpuinfo.patch
./tflite_patches/fetch_ruy.patch
@@ -139,11 +139,12 @@ in stdenv.mkDerivation rec {
configurePhase = ''
cmake \
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON \
+ -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=true \
-Dabseil_SOURCE_DIR2=${abseil_src} \
-Deigen_SOURCE_DIR2=$(pwd)/eigen_src \
-Dfarmhash_SOURCE_DIR2=${farmhash_src} \
-Dfft2d_SOURCE_DIR2=${fft2d_src} \
- -Dgemmlowp_SOURCE_DIR2=${gemmlowp_src} \
+ -DFETCHCONTENT_SOURCE_DIR_gemmlowp=${gemmlowp_src} \
-Dneon2sse_SOURCE_DIR2=${neon2sse_src} \
-Dcpuinfo_SOURCE_DIR2=${cpuinfo_src} \
> CMake Error at /nix/store/6fg3in4qihi93dp1p7in016d062dhw2b-cmake-3.22.3/share/cmake-3.22/Modules/FetchContent.cmake:1075 (message):
> CMake step for gemmlowp failed: 1
> Call Stack (most recent call first):
> /nix/store/6fg3in4qihi93dp1p7in016d062dhw2b-cmake-3.22.3/share/cmake-3.22/Modules/FetchContent.cmake:1216:EVAL:2 (__FetchContent_directPopulate)
> /nix/store/6fg3in4qihi93dp1p7in016d062dhw2b-cmake-3.22.3/share/cmake-3.22/Modules/FetchContent.cmake:1216 (cmake_language)
> /build/source/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake:531 (FetchContent_Populate)
> /build/source/tensorflow/lite/tools/cmake/modules/gemmlowp.cmake:38 (OverridableFetchContent_Populate)
> /build/source/tensorflow/lite/tools/cmake/modules/Findgemmlowp.cmake:18 (include)
> /build/source/tensorflow/lite/CMakeLists.txt:147 (find_package)
| 17:00:00 |
Curid | * ./tflite_patches/fetch_farmhash.patch
./tflite_patches/fetch_fft2d.patch
- ./tflite_patches/fetch_gemmlowp.patch
+ #./tflite_patches/fetch_gemmlowp.patch
./tflite_patches/fetch_neon2sse.patch
./tflite_patches/fetch_cpuinfo.patch
./tflite_patches/fetch_ruy.patch
@@ -139,11 +139,12 @@ in stdenv.mkDerivation rec {
configurePhase = ''
cmake \
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON \
+ -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=true \
-Dabseil_SOURCE_DIR2=${abseil_src} \
-Deigen_SOURCE_DIR2=$(pwd)/eigen_src \
-Dfarmhash_SOURCE_DIR2=${farmhash_src} \
-Dfft2d_SOURCE_DIR2=${fft2d_src} \
- -Dgemmlowp_SOURCE_DIR2=${gemmlowp_src} \
+ -DFETCHCONTENT_SOURCE_DIR_gemmlowp=${gemmlowp_src} \
-Dneon2sse_SOURCE_DIR2=${neon2sse_src} \
-Dcpuinfo_SOURCE_DIR2=${cpuinfo_src} \
error: could not find git for clone of gemmlowp-populate
> CMake Error at /nix/store/6fg3in4qihi93dp1p7in016d062dhw2b-cmake-3.22.3/share/cmake-3.22/Modules/FetchContent.cmake:1075 (message):
> CMake step for gemmlowp failed: 1
> Call Stack (most recent call first):
> /nix/store/6fg3in4qihi93dp1p7in016d062dhw2b-cmake-3.22.3/share/cmake-3.22/Modules/FetchContent.cmake:1216:EVAL:2 (__FetchContent_directPopulate)
> /nix/store/6fg3in4qihi93dp1p7in016d062dhw2b-cmake-3.22.3/share/cmake-3.22/Modules/FetchContent.cmake:1216 (cmake_language)
> /build/source/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake:531 (FetchContent_Populate)
> /build/source/tensorflow/lite/tools/cmake/modules/gemmlowp.cmake:38 (OverridableFetchContent_Populate)
> /build/source/tensorflow/lite/tools/cmake/modules/Findgemmlowp.cmake:18 (include)
> /build/source/tensorflow/lite/CMakeLists.txt:147 (find_package)
| 17:00:38 |
14 May 2025 |
| diamond (it/its) changed their profile picture. | 01:20:08 |
| diamond (it/its) changed their profile picture. | 02:47:47 |
| siraben joined the room. | 04:34:53 |
16 May 2025 |
| Winter joined the room. | 06:13:00 |
| .siev joined the room. | 15:52:39 |
17 May 2025 |
| terrorjack set a profile picture. | 08:53:57 |
19 May 2025 |
| oak 🏳️🌈♥️ changed their display name from oak 🫱⭕🫲 to oak. | 10:59:15 |
| oak 🏳️🌈♥️ changed their display name from oak to oak 🏳️🌈♥️. | 11:01:00 |
Alexandros Liarokapis | this is kind of stupid but, does nixpkgs support using the avr pkgsCross with libstdc++ available ? | 13:17:59 |
K900 | Uhh | 13:19:39 |
K900 | I'm not even sure libstdc++ supports 8-bit targets | 13:19:57 |
Alexandros Liarokapis | I had this working through https://gitlab.com/avr-libstdcxx a few years back for gcc-11 but was using docker back then. It's too niche really, so I don't have many hopes. | 13:22:57 |
emily | hthis is a silly question but… how do you actually specify all of build/host/target when instantiating Nixpkgs? | 13:25:11 |
emily | * this is a silly question but… how do you actually specify all of build/host/target when instantiating Nixpkgs? | 13:25:16 |
K900 | You don't | 13:28:53 |
K900 | You pass in system and crossSystem | 13:29:02 |
K900 | You can't actually specify all three | 13:29:07 |
emily | right, but then… | 13:31:50 |
emily | how do you actually build stuff for that combo? | 13:31:54 |