-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[dx][make] check env and attempt to give advice to get it to build #5
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
That looks cute! |
The |
I will merge this pull and edit it the way I want. |
This was referenced May 9, 2018
1 task
Closed
yuhaijun999
pushed a commit
to yuhaijun999/faiss
that referenced
this pull request
Oct 19, 2023
… ==0 and then search. crash. for example: int d = 64; // dimension; int nb = 1; // database size int nq = 1; // nb of queries std::mt19937 rng; std::uniform_real_distribution<> distrib; float* xb = new float[d * nb]; float* xq = new float[d * nq]; for (int i = 0; i < nb; i++) { for (int j = 0; j < d; j++) xb[d * i + j] = distrib(rng); xb[d * i] += i / 1000.; } for (int i = 0; i < nq; i++) { for (int j = 0; j < d; j++) xq[d * i + j] = distrib(rng); xq[d * i] += i / 1000.; } int nlist = 1; int k = 1; int m = 8; size_t nbits_per_idx = 0; faiss::IndexFlatL2 quantizer(d); faiss::IndexIVFPQ index(&quantizer, d, nlist, m, nbits_per_idx); index.train(nb, xb); index.add(nb, xb); { // with param int query_count = 1; // sanity check idx_t* I = new idx_t[k * query_count]; float* D = new float[k * query_count]; index.search(query_count, xq, k, D, I); // crash. Segmentation fault (core dumped) printf("I=\n"); for (int i = 0; i < query_count; i++) { for (int j = 0; j < k; j++) printf("%5zd ", I[i * k + j]); printf("\n"); } printf("D=\n"); for (int i = 0; i < query_count; i++) { for (int j = 0; j < k; j++) printf("%7g ", D[i * k + j]); printf("\n"); } delete[] I; delete[] D; } ./14-IVFPQ_crash WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points Segmentation fault (core dumped) faiss/faiss/impl/ProductQuantizer-inl.h 72│ inline uint64_t PQDecoderGeneric::decode() { 73│ if (offset == 0) { 74├───────> reg = *code; 75│ } 76│ uint64_t c = (reg >> offset); 77│ 78│ if (offset + nbits >= 8) { 79│ uint64_t e = 8 - offset; 80│ ++code; 81│ for (int i = 0; i < (nbits - (8 - offset)) / 8; ++i) { 82│ c |= ((uint64_t)(*code++) << e); 83│ e += 8; 84│ } 85│ 86│ offset += nbits; 87│ offset &= 7; (gdb) bt ncode=1, codes=0x0, res=...) at /home/user/source2/faiss/faiss/IndexIVFPQ.cpp:908 k=1) at /home/user/source2/faiss/faiss/IndexIVFPQ.cpp:1242 at /home/user/source2/faiss/faiss/IndexIVF.cpp:448 faiss/faiss/IndexIVF.cpp 561├───────────────────> nheap += scanner->scan_codes( 562│ list_size, codes, ids, simi, idxi, k); // codes is empty. not alloc any memmory. 563│ 564│ return list_size; 565│ } 566│ } catch (const std::exception& e) { 567│ std::lock_guard<std::mutex> lock(exception_mutex); 568│ exception_string = 569│ demangle_cpp_symbol(typeid(e).name()) + " " + e.what(); 570│ interrupt = true; 571│ return size_t(0); 572│ } 573│ }; 574│ facebookresearch#5 0x0000000000411d96 in operator() (__closure=0x7fffffffa5c0, key=0, coarse_dis_i=11.6475525, simi=0x584510, idxi=0x5844f0, list_size_max=9223372036854775807) at /home/user/source2/faiss/faiss/IndexIVF.cpp:561
yuhaijun999
pushed a commit
to yuhaijun999/faiss
that referenced
this pull request
Oct 25, 2023
… ==0 and then search. crash. for example: int d = 64; // dimension; int nb = 1; // database size int nq = 1; // nb of queries std::mt19937 rng; std::uniform_real_distribution<> distrib; float* xb = new float[d * nb]; float* xq = new float[d * nq]; for (int i = 0; i < nb; i++) { for (int j = 0; j < d; j++) xb[d * i + j] = distrib(rng); xb[d * i] += i / 1000.; } for (int i = 0; i < nq; i++) { for (int j = 0; j < d; j++) xq[d * i + j] = distrib(rng); xq[d * i] += i / 1000.; } int nlist = 1; int k = 1; int m = 8; size_t nbits_per_idx = 0; faiss::IndexFlatL2 quantizer(d); faiss::IndexIVFPQ index(&quantizer, d, nlist, m, nbits_per_idx); index.train(nb, xb); index.add(nb, xb); { // with param int query_count = 1; // sanity check idx_t* I = new idx_t[k * query_count]; float* D = new float[k * query_count]; index.search(query_count, xq, k, D, I); // crash. Segmentation fault (core dumped) printf("I=\n"); for (int i = 0; i < query_count; i++) { for (int j = 0; j < k; j++) printf("%5zd ", I[i * k + j]); printf("\n"); } printf("D=\n"); for (int i = 0; i < query_count; i++) { for (int j = 0; j < k; j++) printf("%7g ", D[i * k + j]); printf("\n"); } delete[] I; delete[] D; } ./14-IVFPQ_crash WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points Segmentation fault (core dumped) faiss/faiss/impl/ProductQuantizer-inl.h 72│ inline uint64_t PQDecoderGeneric::decode() { 73│ if (offset == 0) { 74├───────> reg = *code; 75│ } 76│ uint64_t c = (reg >> offset); 77│ 78│ if (offset + nbits >= 8) { 79│ uint64_t e = 8 - offset; 80│ ++code; 81│ for (int i = 0; i < (nbits - (8 - offset)) / 8; ++i) { 82│ c |= ((uint64_t)(*code++) << e); 83│ e += 8; 84│ } 85│ 86│ offset += nbits; 87│ offset &= 7; (gdb) bt ncode=1, codes=0x0, res=...) at /home/user/source2/faiss/faiss/IndexIVFPQ.cpp:908 k=1) at /home/user/source2/faiss/faiss/IndexIVFPQ.cpp:1242 at /home/user/source2/faiss/faiss/IndexIVF.cpp:448 faiss/faiss/IndexIVF.cpp 561├───────────────────> nheap += scanner->scan_codes( 562│ list_size, codes, ids, simi, idxi, k); // codes is empty. not alloc any memmory. 563│ 564│ return list_size; 565│ } 566│ } catch (const std::exception& e) { 567│ std::lock_guard<std::mutex> lock(exception_mutex); 568│ exception_string = 569│ demangle_cpp_symbol(typeid(e).name()) + " " + e.what(); 570│ interrupt = true; 571│ return size_t(0); 572│ } 573│ }; 574│ facebookresearch#5 0x0000000000411d96 in operator() (__closure=0x7fffffffa5c0, key=0, coarse_dis_i=11.6475525, simi=0x584510, idxi=0x5844f0, list_size_max=9223372036854775807) at /home/user/source2/faiss/faiss/IndexIVF.cpp:561
yuhaijun999
pushed a commit
to yuhaijun999/faiss
that referenced
this pull request
Oct 25, 2023
… ==0 and then search. crash. for example: int d = 64; // dimension; int nb = 1; // database size int nq = 1; // nb of queries std::mt19937 rng; std::uniform_real_distribution<> distrib; float* xb = new float[d * nb]; float* xq = new float[d * nq]; for (int i = 0; i < nb; i++) { for (int j = 0; j < d; j++) xb[d * i + j] = distrib(rng); xb[d * i] += i / 1000.; } for (int i = 0; i < nq; i++) { for (int j = 0; j < d; j++) xq[d * i + j] = distrib(rng); xq[d * i] += i / 1000.; } int nlist = 1; int k = 1; int m = 8; size_t nbits_per_idx = 0; faiss::IndexFlatL2 quantizer(d); faiss::IndexIVFPQ index(&quantizer, d, nlist, m, nbits_per_idx); index.train(nb, xb); index.add(nb, xb); { // with param int query_count = 1; // sanity check idx_t* I = new idx_t[k * query_count]; float* D = new float[k * query_count]; index.search(query_count, xq, k, D, I); // crash. Segmentation fault (core dumped) printf("I=\n"); for (int i = 0; i < query_count; i++) { for (int j = 0; j < k; j++) printf("%5zd ", I[i * k + j]); printf("\n"); } printf("D=\n"); for (int i = 0; i < query_count; i++) { for (int j = 0; j < k; j++) printf("%7g ", D[i * k + j]); printf("\n"); } delete[] I; delete[] D; } ./14-IVFPQ_crash WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points Segmentation fault (core dumped) faiss/faiss/impl/ProductQuantizer-inl.h 72│ inline uint64_t PQDecoderGeneric::decode() { 73│ if (offset == 0) { 74├───────> reg = *code; 75│ } 76│ uint64_t c = (reg >> offset); 77│ 78│ if (offset + nbits >= 8) { 79│ uint64_t e = 8 - offset; 80│ ++code; 81│ for (int i = 0; i < (nbits - (8 - offset)) / 8; ++i) { 82│ c |= ((uint64_t)(*code++) << e); 83│ e += 8; 84│ } 85│ 86│ offset += nbits; 87│ offset &= 7; (gdb) bt ncode=1, codes=0x0, res=...) at /home/user/source2/faiss/faiss/IndexIVFPQ.cpp:908 k=1) at /home/user/source2/faiss/faiss/IndexIVFPQ.cpp:1242 at /home/user/source2/faiss/faiss/IndexIVF.cpp:448 faiss/faiss/IndexIVF.cpp 561├───────────────────> nheap += scanner->scan_codes( 562│ list_size, codes, ids, simi, idxi, k); // codes is empty. not alloc any memmory. 563│ 564│ return list_size; 565│ } 566│ } catch (const std::exception& e) { 567│ std::lock_guard<std::mutex> lock(exception_mutex); 568│ exception_string = 569│ demangle_cpp_symbol(typeid(e).name()) + " " + e.what(); 570│ interrupt = true; 571│ return size_t(0); 572│ } 573│ }; 574│ facebookresearch#5 0x0000000000411d96 in operator() (__closure=0x7fffffffa5c0, key=0, coarse_dis_i=11.6475525, simi=0x584510, idxi=0x5844f0, list_size_max=9223372036854775807) at /home/user/source2/faiss/faiss/IndexIVF.cpp:561
yuhaijun999
pushed a commit
to yuhaijun999/faiss
that referenced
this pull request
Oct 25, 2023
… ==0 and then search. crash. for example: int d = 64; // dimension; int nb = 1; // database size int nq = 1; // nb of queries std::mt19937 rng; std::uniform_real_distribution<> distrib; float* xb = new float[d * nb]; float* xq = new float[d * nq]; for (int i = 0; i < nb; i++) { for (int j = 0; j < d; j++) xb[d * i + j] = distrib(rng); xb[d * i] += i / 1000.; } for (int i = 0; i < nq; i++) { for (int j = 0; j < d; j++) xq[d * i + j] = distrib(rng); xq[d * i] += i / 1000.; } int nlist = 1; int k = 1; int m = 8; size_t nbits_per_idx = 0; faiss::IndexFlatL2 quantizer(d); faiss::IndexIVFPQ index(&quantizer, d, nlist, m, nbits_per_idx); index.train(nb, xb); index.add(nb, xb); { // with param int query_count = 1; // sanity check idx_t* I = new idx_t[k * query_count]; float* D = new float[k * query_count]; index.search(query_count, xq, k, D, I); // crash. Segmentation fault (core dumped) printf("I=\n"); for (int i = 0; i < query_count; i++) { for (int j = 0; j < k; j++) printf("%5zd ", I[i * k + j]); printf("\n"); } printf("D=\n"); for (int i = 0; i < query_count; i++) { for (int j = 0; j < k; j++) printf("%7g ", D[i * k + j]); printf("\n"); } delete[] I; delete[] D; } ./14-IVFPQ_crash WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points Segmentation fault (core dumped) faiss/faiss/impl/ProductQuantizer-inl.h 72│ inline uint64_t PQDecoderGeneric::decode() { 73│ if (offset == 0) { 74├───────> reg = *code; 75│ } 76│ uint64_t c = (reg >> offset); 77│ 78│ if (offset + nbits >= 8) { 79│ uint64_t e = 8 - offset; 80│ ++code; 81│ for (int i = 0; i < (nbits - (8 - offset)) / 8; ++i) { 82│ c |= ((uint64_t)(*code++) << e); 83│ e += 8; 84│ } 85│ 86│ offset += nbits; 87│ offset &= 7; (gdb) bt ncode=1, codes=0x0, res=...) at /home/user/source2/faiss/faiss/IndexIVFPQ.cpp:908 k=1) at /home/user/source2/faiss/faiss/IndexIVFPQ.cpp:1242 at /home/user/source2/faiss/faiss/IndexIVF.cpp:448 faiss/faiss/IndexIVF.cpp 561├───────────────────> nheap += scanner->scan_codes( 562│ list_size, codes, ids, simi, idxi, k); // codes is empty. not alloc any memmory. 563│ 564│ return list_size; 565│ } 566│ } catch (const std::exception& e) { 567│ std::lock_guard<std::mutex> lock(exception_mutex); 568│ exception_string = 569│ demangle_cpp_symbol(typeid(e).name()) + " " + e.what(); 570│ interrupt = true; 571│ return size_t(0); 572│ } 573│ }; 574│ facebookresearch#5 0x0000000000411d96 in operator() (__closure=0x7fffffffa5c0, key=0, coarse_dis_i=11.6475525, simi=0x584510, idxi=0x5844f0, list_size_max=9223372036854775807) at /home/user/source2/faiss/faiss/IndexIVF.cpp:561
yuhaijun999
pushed a commit
to yuhaijun999/faiss
that referenced
this pull request
Jan 22, 2024
… ==0 and then search. crash. for example: int d = 64; // dimension; int nb = 1; // database size int nq = 1; // nb of queries std::mt19937 rng; std::uniform_real_distribution<> distrib; float* xb = new float[d * nb]; float* xq = new float[d * nq]; for (int i = 0; i < nb; i++) { for (int j = 0; j < d; j++) xb[d * i + j] = distrib(rng); xb[d * i] += i / 1000.; } for (int i = 0; i < nq; i++) { for (int j = 0; j < d; j++) xq[d * i + j] = distrib(rng); xq[d * i] += i / 1000.; } int nlist = 1; int k = 1; int m = 8; size_t nbits_per_idx = 0; faiss::IndexFlatL2 quantizer(d); faiss::IndexIVFPQ index(&quantizer, d, nlist, m, nbits_per_idx); index.train(nb, xb); index.add(nb, xb); { // with param int query_count = 1; // sanity check idx_t* I = new idx_t[k * query_count]; float* D = new float[k * query_count]; index.search(query_count, xq, k, D, I); // crash. Segmentation fault (core dumped) printf("I=\n"); for (int i = 0; i < query_count; i++) { for (int j = 0; j < k; j++) printf("%5zd ", I[i * k + j]); printf("\n"); } printf("D=\n"); for (int i = 0; i < query_count; i++) { for (int j = 0; j < k; j++) printf("%7g ", D[i * k + j]); printf("\n"); } delete[] I; delete[] D; } ./14-IVFPQ_crash WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points WARNING clustering 1 points to 1 centroids: please provide at least 39 training points Segmentation fault (core dumped) faiss/faiss/impl/ProductQuantizer-inl.h 72│ inline uint64_t PQDecoderGeneric::decode() { 73│ if (offset == 0) { 74├───────> reg = *code; 75│ } 76│ uint64_t c = (reg >> offset); 77│ 78│ if (offset + nbits >= 8) { 79│ uint64_t e = 8 - offset; 80│ ++code; 81│ for (int i = 0; i < (nbits - (8 - offset)) / 8; ++i) { 82│ c |= ((uint64_t)(*code++) << e); 83│ e += 8; 84│ } 85│ 86│ offset += nbits; 87│ offset &= 7; (gdb) bt ncode=1, codes=0x0, res=...) at /home/user/source2/faiss/faiss/IndexIVFPQ.cpp:908 k=1) at /home/user/source2/faiss/faiss/IndexIVFPQ.cpp:1242 at /home/user/source2/faiss/faiss/IndexIVF.cpp:448 faiss/faiss/IndexIVF.cpp 561├───────────────────> nheap += scanner->scan_codes( 562│ list_size, codes, ids, simi, idxi, k); // codes is empty. not alloc any memmory. 563│ 564│ return list_size; 565│ } 566│ } catch (const std::exception& e) { 567│ std::lock_guard<std::mutex> lock(exception_mutex); 568│ exception_string = 569│ demangle_cpp_symbol(typeid(e).name()) + " " + e.what(); 570│ interrupt = true; 571│ return size_t(0); 572│ } 573│ }; 574│ facebookresearch#5 0x0000000000411d96 in operator() (__closure=0x7fffffffa5c0, key=0, coarse_dis_i=11.6475525, simi=0x584510, idxi=0x5844f0, list_size_max=9223372036854775807) at /home/user/source2/faiss/faiss/IndexIVF.cpp:561
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.