forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTHCTensorMathMagma.cpp
More file actions
36 lines (30 loc) · 832 Bytes
/
Copy pathTHCTensorMathMagma.cpp
File metadata and controls
36 lines (30 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <THC/THCGeneral.h>
#include <THC/THCTensorMath.h>
#include <THC/THCTensorCopy.h>
#include <THC/THCTensorMathMagma.h>
#include <THC/THCTensor.hpp>
#include <THC/THCStorage.hpp>
#include <algorithm>
#include <ATen/native/cuda/MiscUtils.h>
#include <ATen/cuda/detail/CUDAHooks.h>
#ifdef USE_MAGMA
#include <magma_v2.h>
#endif
#ifndef DIVUP
#define DIVUP(x, y) (((x) + (y) - 1) / (y))
#endif
#define NoMagma(name) "No CUDA implementation of '" #name "'. Install MAGMA and rebuild cutorch (http://icl.cs.utk.edu/magma/)"
namespace {
void _THCMagma_init() {
#ifdef USE_MAGMA
magma_init();
#endif
}
struct Initializer {
Initializer() {
::at::cuda::detail::THCMagma_init = _THCMagma_init;
};
} initializer;
} // anonymous namespace
#include <THC/generic/THCTensorMathMagma.cpp>
#include <THC/THCGenerateAllTypes.h>