Skip to content

Commit

Permalink
add missing cpuinfo initialize in weight packing for group conv (pyto…
Browse files Browse the repository at this point in the history
…rch#403)

Summary:
Pull Request resolved: pytorch#403

fix a bug where groupwise convolution weight packing code path is always default to avx2

Reviewed By: dskhudia

Differential Revision: D23003412

fbshipit-source-id: 807db3cd170c965275db4601f82f635507c9eb0e
  • Loading branch information
YazhiGao authored and facebook-github-bot committed Aug 11, 2020
1 parent 29d5eb9 commit 8187c1d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/PackWeightMatrixForGConv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ PackWeightMatrixForGConv<T, accT, SPATIAL_DIM>::PackWeightMatrixForGConv(
const T* sdata,
T* pdata)
: trans_(trans), conv_param_(conv_param), sdata_(sdata) {
if (!cpuinfo_initialize()) {
throw std::runtime_error("Failed to initialize cpuinfo!");
}
if (!pdata) {
bufAllocatedHere_ = true;
int kernel_prod = std::accumulate(
Expand Down

0 comments on commit 8187c1d

Please sign in to comment.