Skip to content

Commit

Permalink
fix compile error.
Browse files Browse the repository at this point in the history
  • Loading branch information
mfbalin committed Jul 9, 2024
1 parent 6ccc993 commit d54017b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions graphbolt/src/cnumpy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ void OnDiskNpyArray::IndexSelectIOUringImpl(
throw std::runtime_error("IndexError: Index out of range.");
}

return result;
// return result; the input result parameter is the return value of this func.
}

c10::intrusive_ptr<Future<torch::Tensor>> OnDiskNpyArray::IndexSelectIOUring(
Expand All @@ -246,8 +246,8 @@ c10::intrusive_ptr<Future<torch::Tensor>> OnDiskNpyArray::IndexSelectIOUring(
.layout(torch::kStrided)
.requires_grad(false));

auto future =
at::intraop_launch_future([=]() { IndexSelectIOUring(index, result); });
auto future = at::intraop_launch_future(
[=]() { IndexSelectIOUringImpl(index, result); });

return c10::make_intrusive<Future<torch::Tensor>>(future, result);
}
Expand Down
3 changes: 1 addition & 2 deletions graphbolt/src/cnumpy.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ class OnDiskNpyArray : public torch::CustomClassHolder {
c10::intrusive_ptr<Future<torch::Tensor>> IndexSelectIOUring(
torch::Tensor index);

void OnDiskNpyArray::IndexSelectIOUringImpl(
torch::Tensor index, torch::Tensor result);
void IndexSelectIOUringImpl(torch::Tensor index, torch::Tensor result);

#endif // HAVE_LIBRARY_LIBURING
private:
Expand Down

0 comments on commit d54017b

Please sign in to comment.