Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions torchcsprng/csrc/OffsetCalculator.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#pragma once

#include <ATen/core/Array.h>
#include <ATen/native/TensorIterator.h>
#include <c10/macros/Macros.h>
#include <array>
Expand All @@ -29,7 +28,7 @@ struct OffsetCalculator {
// On CUDA, zero sized array is not allowed, so when we are handling nullary
// operators, we need to create a size 1 offset to avoid compiler failure.
// This size 1 offset is just a placeholder, and we will not use it.
using offset_type = at::detail::Array<index_t, std::max<int>(NARGS, 1)>;
using offset_type = std::array<index_t, std::max<int>(NARGS, 1)>;

// if element_sizes is nullptr, then the strides will be in bytes, otherwise
// the strides will be in # of elements.
Expand Down Expand Up @@ -89,7 +88,7 @@ struct TrivialOffsetCalculator {
// On CUDA, zero sized array is not allowed, so when we are handling nullary
// operators, we need to create a size 1 offset to avoid compiler failure.
// This size 1 offset is just a placeholder, and we will not use it.
using offset_type = at::detail::Array<index_t, std::max<int>(NARGS, 1)>;
using offset_type = std::array<index_t, std::max<int>(NARGS, 1)>;

C10_HOST_DEVICE offset_type get(index_t linear_idx) const {
offset_type offsets;
Expand Down