CUTLASS
CUDA Templates for Linear Algebra Subroutines and Solvers
|
#include <utility>
#include <cstdlib>
#include <cmath>
#include <type_traits>
#include <cstdint>
#include <cublas_v2.h>
#include <curand_kernel.h>
#include "cutlass/cutlass.h"
#include "cutlass/array.h"
#include "cutlass/tensor_view.h"
#include "cutlass/util/reference/device/tensor_foreach.h"
#include "cutlass/util/distribution.h"
Go to the source code of this file.
Namespaces | |
cutlass | |
cutlass::reference | |
cutlass::reference::device | |
cutlass::reference::device::detail | |
Functions | |
template<typename FloatType > | |
CUTLASS_DEVICE FloatType | cutlass::reference::device::detail::random_normal_float (curandState_t *state) |
template<> | |
CUTLASS_DEVICE double | cutlass::reference::device::detail::random_normal_float< double > (curandState_t *state) |
template<typename FloatType > | |
CUTLASS_DEVICE FloatType | cutlass::reference::device::detail::random_uniform_float (curandState_t *state) |
template<> | |
CUTLASS_DEVICE double | cutlass::reference::device::detail::random_uniform_float< double > (curandState_t *state) |
template<typename Element , typename Layout > | |
void | cutlass::reference::device::TensorFillRandomGaussian (TensorView< Element, Layout > view, uint64_t seed, Element mean=Element(0), Element stddev=Element(1), int bits=-1) |
Fills a tensor with random values with a Gaussian distribution. More... | |
template<typename Element > | |
void | cutlass::reference::device::BlockFillRandomGaussian (Element *ptr, size_t capacity, uint64_t seed, Element mean=Element(0), Element stddev=Element(1), int bits=-1) |
Fills a tensor with random values with a Gaussian distribution. More... | |
template<typename Element , typename Layout > | |
void | cutlass::reference::device::TensorFillRandomUniform (TensorView< Element, Layout > view, uint64_t seed, Element max=Element(1), Element min=Element(0), int bits=-1) |
Fills a tensor with random values with a uniform random distribution. More... | |
template<typename Element > | |
void | cutlass::reference::device::BlockFillRandomUniform (Element *ptr, size_t capacity, uint64_t seed, Element max=Element(1), Element min=Element(0), int bits=-1) |
Fills a tensor with random values with a uniform random distribution. More... | |
template<typename Element , typename Layout > | |
void | cutlass::reference::device::TensorFillDiagonal (TensorView< Element, Layout > view, Element diag=Element(1), Element other=Element(0)) |
Fills a tensor everywhere with a unique value for its diagonal. More... | |
template<typename Element , typename Layout > | |
void | cutlass::reference::device::TensorFill (TensorView< Element, Layout > view, Element val=Element(0)) |
Fills a tensor with a uniform value. More... | |
template<typename Element , typename Layout > | |
void | cutlass::reference::device::TensorFillIdentity (TensorView< Element, Layout > view) |
Fills a tensor's diagonal with 1 and 0 everywhere else. More... | |
template<typename Element , typename Layout > | |
void | cutlass::reference::device::TensorUpdateDiagonal (TensorView< Element, Layout > view, Element diag=Element(1)) |
Writes a uniform value to the diagonal of a tensor without modifying off-diagonal elements. More... | |
template<typename Element , typename Layout > | |
void | cutlass::reference::device::TensorUpdateOffDiagonal (TensorView< Element, Layout > view, Element other=Element(1)) |
Writes a uniform value to all elements in the tensor without modifying diagonal elements. More... | |
template<typename Element , typename Layout > | |
void | cutlass::reference::device::TensorFillLinear (TensorView< Element, Layout > view, Array< Element, Layout::kRank > const &v, Element s=Element(0)) |
Fills tensor with a linear combination of its coordinate and another vector. More... | |
template<typename Element > | |
void | cutlass::reference::device::BlockFillSequential (Element *ptr, int64_t capacity, Element v=Element(1), Element s=Element(0)) |
Fills a block of data with sequential elements. More... | |
template<typename Element > | |
void | cutlass::reference::device::BlockFillRandom (Element *ptr, size_t capacity, uint64_t seed, Distribution dist) |
Fills a block of data with sequential elements. More... | |
template<typename Element , typename Layout > | |
void | cutlass::reference::device::TensorCopyDiagonalIn (TensorView< Element, Layout > view, Element const *ptr) |
Copies a diagonal in from host memory without modifying off-diagonal elements. More... | |
template<typename Element , typename Layout > | |
void | cutlass::reference::device::TensorCopyDiagonalOut (Element *ptr, TensorView< Element, Layout > view) |
Copies the diagonal of a tensor into a dense buffer in host memory. More... | |