InferLLM icon indicating copy to clipboard operation
InferLLM copied to clipboard

windows下面编译失败

Open kavern1128 opened this issue 2 years ago • 8 comments

D:/Programming/InferLLM/src/file.h: In destructor 'inferllm::InputFile::~InputFile()': D:/Programming/InferLLM/src/file.h:36:13: error: 'munmap' was not declared in this scope 36 | munmap(m_mmap_addr, m_size); | ^~~~~~ ninja: build stopped: subcommand failed.

kavern1128 avatar May 15 '23 03:05 kavern1128

是的,暂时没有在windows上支持,但是支持也应该挺简单的,这个mmpap需要替换一下

chenqy4933 avatar May 15 '23 05:05 chenqy4933

嗯嗯,试过好多个开源GPT,只有InferLLM的运行速度是最快的,希望大佬有时间的时候,能把windows下也支持一下,感谢

kavern1128 avatar May 16 '23 03:05 kavern1128

ubuntu下完美运行,同问Windows的支持计划,非常感谢

zhouxihong1 avatar Jun 01 '23 11:06 zhouxihong1

我尝试把mmpap换成了win下的等效函数然后把 if (m_enable_mmap) { int flags = MAP_SHARED; m_mmap_addr = mmap(NULL, m_size, PROT_READ, flags, m_fd, 0); INFER_ASSERT(m_mmap_addr != MAP_FAILED, "mmap failed."); madvise(m_mmap_addr, m_size, MADV_WILLNEED); } 注释掉了结果现在编译报错这个: PS C:\Users\Administrator\Documents\GitHub\InferLLM\build> make -j16 [ 2%] Building CXX object CMakeFiles/InferLLM.dir/src/kern/optimized/x86/kernel.cpp.obj In file included from C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\kernel.cpp:8: C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\optimized.h: In lambda function: C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\optimized.h:321:13: error: multiversioning needs 'ifunc' which is not supported on this target 321 | inline void elemwise_vector_add( | ^~~~~~~~~~~~~~~~~~~ C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\kernel.cpp:42:13: error: use of multiversioned function without a default 42 | }; | ^ C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\optimized.h: In lambda function: C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\optimized.h:380:13: error: multiversioning needs 'ifunc' which is not supported on this target 380 | inline void elemwise_vector_mul( | ^~~~~~~~~~~~~~~~~~~ C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\kernel.cpp:51:13: error: use of multiversioned function without a default 51 | }; | ^ C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\optimized.h: In lambda function: C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\optimized.h:443:13: error: multiversioning needs 'ifunc' which is not supported on this target 443 | inline void elemwise_vector_silu( | ^~~~~~~~~~~~~~~~~~~~ C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\kernel.cpp:59:13: error: use of multiversioned function without a default 59 | }; | ^ C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\optimized.h: In lambda function: C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\optimized.h:321:13: error: multiversioning needs 'ifunc' which is not supported on this target 321 | inline void elemwise_vector_add( | ^~~~~~~~~~~~~~~~~~~ C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\kernel.cpp:88:13: error: use of multiversioned function without a default 88 | }; | ^ C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\optimized.h: In lambda function: C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\optimized.h:380:13: error: multiversioning needs 'ifunc' which is not supported on this target 380 | inline void elemwise_vector_mul( | ^~~~~~~~~~~~~~~~~~~ C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\kernel.cpp:98:13: error: use of multiversioned function without a default 98 | }; | ^ C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\optimized.h: In lambda function: C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\optimized.h:520:14: error: multiversioning needs 'ifunc' which is not supported on this target 520 | inline float reduce_square_sum(const int n, const float* __restrict x) { | ^~~~~~~~~~~~~~~~~ C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\kernel.cpp:117:5: error: use of multiversioned function without a default 117 | }; | ^ C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\optimized.h:475:13: error: multiversioning needs 'ifunc' which is not supported on this target 475 | inline void elemwise_vec_scale( | ^~~~~~~~~~~~~~~~~~ C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\kernel.cpp:117:5: error: use of multiversioned function without a default 117 | }; | ^ C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\optimized.h: In lambda function: C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\optimized.h:564:14: error: multiversioning needs 'ifunc' which is not supported on this target 564 | inline float reduce_max(const int n, const float* __restrict x) { | ^~~~~~~~~~ C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\kernel.cpp:133:5: error: use of multiversioned function without a default 133 | }; | ^ C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\optimized.h:641:14: error: multiversioning needs 'ifunc' which is not supported on this target 641 | inline float select_sub_max_and_reduce_sum( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\kernel.cpp:133:5: error: use of multiversioned function without a default 133 | }; | ^ C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\optimized.h:475:13: error: multiversioning needs 'ifunc' which is not supported on this target 475 | inline void elemwise_vec_scale( | ^~~~~~~~~~~~~~~~~~ C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\kernel.cpp:133:5: error: use of multiversioned function without a default 133 | }; | ^ C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\optimized.h: In lambda function: C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\optimized.h:777:13: error: multiversioning needs 'ifunc' which is not supported on this target 777 | inline void compute_src_offset_embd_matmul( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\kernel.cpp:227:5: error: use of multiversioned function without a default 227 | }; | ^ C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\optimized.h: In lambda function: C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\optimized.h:916:13: error: multiversioning needs 'ifunc' which is not supported on this target 916 | inline void comput_matmul_with_dst_uncontinue( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\Users\Administrator\Documents\GitHub\InferLLM\src\kern\optimized\x86\kernel.cpp:246:5: error: use of multiversioned function without a default 246 | }; | ^ make[2]: *** [CMakeFiles/InferLLM.dir/src/kern/optimized/x86/kernel.cpp.obj] 错误 1 make[1]: *** [CMakeFiles/InferLLM.dir/all] 错误 2 make: *** [all] 错误 2

bzy-080408 avatar Aug 22 '23 14:08 bzy-080408

image

bzy-080408 avatar Aug 22 '23 14:08 bzy-080408

bug参考https://gitlab.gnome.org/GNOME/gtk/-/issues/4285 但是我不知道怎么解决

bzy-080408 avatar Aug 22 '23 23:08 bzy-080408

the compiler not support target attribute feature,maybe you should change the compiler to clang_cl

chenqy4933 avatar Aug 23 '23 04:08 chenqy4933

切换为clang_cl之后cmake配置错误 bug.txt

bzy-080408 avatar Aug 26 '23 01:08 bzy-080408