5 #include <ATen/miopen/miopen-wrapper.h> 6 #include <ATen/miopen/Handle.h> 8 namespace at {
namespace native {
10 inline void setMIOpenStreamToCurrent() {
13 MIOPEN_CHECK(miopenSetStream(getMiopenHandle(), at::hip::getCurrentHIPStream()));
18 inline Tensor contiguousIfZeroInStrides(
const Tensor& t) {
19 for (
auto s : t.strides()) {
20 if (s == 0)
return t.contiguous();
Flush-To-Zero and Denormals-Are-Zero mode.