mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-15 21:00:47 +00:00
This reverts commit 716b3b893d.
Reverted https://github.com/pytorch/pytorch/pull/103725 on behalf of https://github.com/osalpekar due to Broke caffe2 builds due. More info at [D46920675](https://www.internalfb.com/diff/D46920675) ([comment](https://github.com/pytorch/pytorch/pull/103725#issuecomment-1603129273))
17 lines
402 B
C++
17 lines
402 B
C++
#include <mutex>
|
|
|
|
#include <qnnpack.h>
|
|
|
|
#include "caffe2/core/logging.h"
|
|
|
|
namespace caffe2 {
|
|
|
|
void initQNNPACK() {
|
|
static std::once_flag once;
|
|
static enum qnnp_status qnnpackStatus = qnnp_status_uninitialized;
|
|
std::call_once(once, []() { qnnpackStatus = qnnp_initialize(); });
|
|
CAFFE_ENFORCE(
|
|
qnnpackStatus == qnnp_status_success, "failed to initialize QNNPACK");
|
|
}
|
|
|
|
} // namespace caffe2
|