Skip to content

Commit

Permalink
Build fix with certain compilers versions (pytorch#575)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#575

Issue reported in pytorch#573

static constexpr public members of a class should have a definition available if used outside the class.

Reviewed By: shz0116

Differential Revision: D27265594

fbshipit-source-id: b7094f19932e33aafa8489ece2942df71374d250
  • Loading branch information
dskhudia authored and facebook-github-bot committed Mar 25, 2021
1 parent 203f7ff commit 6c051e1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/FbgemmSparseDense.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ fbgemmDenseToBCSR(int R, int C, const T* inp) {
return fbgemmDenseToBCSR<T, RB, CB>(R, C, inp, C);
}

template <typename T, int RB, int CB>
constexpr int BCSRMatrix<T, RB, CB>::RB;

template <typename T, int RB, int CB>
constexpr int BCSRMatrix<T, RB, CB>::CB;

template <typename T, int RB, int CB>
constexpr int BCSRMatrix<T, RB, CB>::COLTILE;

template <typename T, int RB, int CB>
void BCSRMatrix<T, RB, CB>::pack(const DTYPE* src, size_t ld) {
rowBPtr.push_back(0);
Expand Down

0 comments on commit 6c051e1

Please sign in to comment.