Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error: ‘max_element’ is not a member of ‘std’ #92

Closed
lindeer opened this issue Apr 18, 2023 · 1 comment
Closed

Compile error: ‘max_element’ is not a member of ‘std’ #92

lindeer opened this issue Apr 18, 2023 · 1 comment

Comments

@lindeer
Copy link
Contributor

lindeer commented Apr 18, 2023

compiled error at master@cc91df0 in example files:

[ 74%] Built target test-vec1
/home/wesley/WorkPlace/chatGPT/ggml/examples/mnist/main.cpp: In function ‘int mnist_eval(const mnist_model&, int, std::vector<float>)’:
/home/wesley/WorkPlace/chatGPT/ggml/examples/mnist/main.cpp:196:27: error: ‘max_element’ is not a member of ‘std’; did you mean ‘tuple_element’?
  196 |     int prediction = std::max_element(finalData, finalData + 10) - finalData;
      |                           ^~~~~~~~~~~
      |                           tuple_element
make[2]: *** [examples/mnist/CMakeFiles/mnist.dir/build.make:76: examples/mnist/CMakeFiles/mnist.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:704: examples/mnist/CMakeFiles/mnist.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

max_element is always contained in <algorithm>, but main.cpp did not include it.

@lindeer
Copy link
Contributor Author

lindeer commented Apr 21, 2023

fixed by d71eba4

@lindeer lindeer closed this as completed Apr 21, 2023
CCLDArjun pushed a commit to CCLDArjun/ggml that referenced this issue Dec 18, 2023
* Add quantize script for batch quantization

* Indentation

* README for new quantize.sh

* Fix script name

* Fix file list on Mac OS

---------

Co-authored-by: Georgi Gerganov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant