We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b5283f7 commit 5ce3c19Copy full SHA for 5ce3c19
src/nn/nn-cpu.cpp
@@ -14,7 +14,7 @@
14
15
#define DEBUG_CPU_OP_QUANTS false
16
17
-#define BUFFER_ALIGNMENT 16
+#define BUFFER_ALIGNMENT 64
18
19
static NnByte *allocAlignedBuffer(size_t size) {
20
NnByte *buffer;
@@ -25,8 +25,7 @@ static NnByte *allocAlignedBuffer(size_t size) {
25
#else
26
if (posix_memalign((void **)&buffer, BUFFER_ALIGNMENT, size) != 0)
27
throw std::runtime_error("posix_memalign failed");
28
- if (mlock(buffer, size) != 0)
29
- fprintf(stderr, "🚧 Cannot allocate %zu bytes directly in RAM\n", size);
+ mlock(buffer, size);
30
#endif
31
return buffer;
32
}
0 commit comments