4 #include <ATen/cuda/Exceptions.h> 6 #include <ATen/cudnn/cudnn-wrapper.h> 7 #include <ATen/cudnn/Handle.h> 9 namespace at {
namespace native {
11 inline void setCuDNNStreamToCurrent() {
13 AT_CUDNN_CHECK(cudnnSetStream(getCudnnHandle(), at::cuda::getCurrentCUDAStream()));
20 inline Tensor contiguousIfZeroInStrides(
const Tensor& t) {
21 for (
auto s : t.strides()) {
22 if (s == 0)
return t.contiguous();
Flush-To-Zero and Denormals-Are-Zero mode.