I found some errors when building on a rpi 5
#9
by
eddieoz
- opened
Compiling errors:
include/bitnet-lut-kernels.h:12:5: error: use of undeclared identifier 'posix_memalign'
include/bitnet-lut-kernels.h:289:5: error: use of undeclared identifier 'memset'
My fix: edit BitNet/include/bitnet-lut-kernels.h
/* Add includes */
#include <string.h>
#include <malloc.h>
...
#if defined(_WIN32)
return _aligned_malloc(size, 64);
#else
void * ptr = nullptr;
/* Change the following line from posix_memalign to malloc memalign */
// posix_memalign(&ptr, 64, size);
ptr = memalign(64, size);
return ptr;
#endif
Then build: cmake --build build --config Release
I published a blog post with all steps and recorded a video demonstrating it working:
https://www.eddieoz.com/building-bitnet-on-raspberry-pi-5-arm64-2/
Soo cool ! thanks for the blogpost, very helpful