Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

isnan报错

Open
#24 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
50/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
build-system

Research direction

Start with src/kern/optimized/x86/quantize.h around line 260, where the build reports that isnan is not declared. Reproduce the failure with the repository's CMake build and inspect the nearby includes and namespace usage. Done means the InferLLMShared target builds successfully without this error.

Written by the indexing model from the issue text.

Description

In file included from /home/xxx/ClionProjects/InferLLM/src/kern/optimized/x86/quantize.h:3:0,
                 from /home/xxx/ClionProjects/InferLLM/src/kern/optimized/kernel_opt.cpp:11:
/home/xxx/ClionProjects/InferLLM/src/kern/optimized/x86/quantize.h: In function ‘void inferllm::opt::dequantize_row_q4_0(const void*, float*, int)’:
/home/xxx/ClionProjects/InferLLM/src/kern/optimized/x86/quantize.h:260:46: error: ‘isnan’ was not declared in this scope
             assert(!isnan(y[i * QK40 + l + 0]));
                                              ^
/home/xxx/ClionProjects/InferLLM/src/kern/optimized/x86/quantize.h:260:46: note: suggested alternative:
In file included from /usr/include/c++/5/random:38:0,
                 from /home/xxx/ClionProjects/InferLLM/src/utils.h:8,
                 from /home/xxx/ClionProjects/InferLLM/src/kern/optimized/kernel_opt.cpp:3:
/usr/include/c++/5/cmath:641:5: note:   ‘std::isnan’
     isnan(_Tp __x)
     ^
CMakeFiles/InferLLMShared.dir/build.make:257: recipe for target 'CMakeFiles/InferLLMShared.dir/src/kern/optimized/kernel_opt.cpp.o' failed
make[2]: *** [CMakeFiles/InferLLMShared.dir/src/kern/optimized/kernel_opt.cpp.o] Error 1
CMakeFiles/Makefile2:90: recipe for target 'CMakeFiles/InferLLMShared.dir/all' failed
make[1]: *** [CMakeFiles/InferLLMShared.dir/all] Error 2
Makefile:90: recipe for target 'all' failed
make: *** [all] Error 2
Dominant language
C++
Stars
752
Forks
94
PR merge metrics
No merged PRs in 30d

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MegEngine/InferLLM

All issues in MegEngine/InferLLM

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.