We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01fa24e commit 9472aefCopy full SHA for 9472aef
csrc/cuda/utils.cuh
@@ -8,8 +8,9 @@
8
#define CHECK_CONTIGUOUS(x) \
9
AT_ASSERTM(x.is_contiguous(), #x " must be contiguous")
10
11
-__device__ int64_t get_example_idx(int64_t idx, const int64_t *ptr,
12
- const int64_t num_examples) {
+__forceinline__ __device__ int64_t get_example_idx(int64_t idx,
+ const int64_t *ptr,
13
+ const int64_t num_examples) {
14
for (int64_t i = 0; i < num_examples; i++) {
15
if (ptr[i + 1] > idx)
16
return i;
0 commit comments