Skip to content

Correction for /faiss/gpu/utils/MatrixMult-inl.cuh #3026

@DearLabQCM

Description

@DearLabQCM

Summary
A bug in /faiss/gpu/utils/MatrixMult-inl.cuh line174-175

// All sizes must be within int bounds
    FAISS_ASSERT(c.getSize(0) <= std::numeric_limits<int>::max());
    FAISS_ASSERT(c.getSize(1) <= std::numeric_limits<int>::max());

    FAISS_ASSERT(a.getSize(0) <= std::numeric_limits<int>::max());
    FAISS_ASSERT(a.getSize(1) <= std::numeric_limits<int>::max());

    FAISS_ASSERT(a.getSize(0) <= std::numeric_limits<int>::max());
    FAISS_ASSERT(a.getSize(1) <= std::numeric_limits<int>::max());

Maybe it should be

FAISS_ASSERT(b.getSize(0) <= std::numeric_limits<int>::max());
FAISS_ASSERT(b.getSize(1) <= std::numeric_limits<int>::max());

Platform
OS: pop-os 22.04 LTS (ubuntu based)

Faiss version: faiss-cpu 1.7.4

Installed from: pip
Python 3.11.4
numpy 1.24.3

Faiss compilation options: ?

Running on:

[x ] CPU
GPU
Interface:

C++
[x ] Python

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions