Skip to content

Commit

Permalink
lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Jul 18, 2024
1 parent bbdaf67 commit 542e0ae
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/common/ref_resource_view.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace xgboost::common {
* @brief Make a fixed size `RefResourceView` with cudaMalloc resource.
*/
template <typename T>
[[nodiscard]] RefResourceView<T> MakeFixedVecWithCudaMalloc(Context const* ctx,
[[nodiscard]] RefResourceView<T> MakeFixedVecWithCudaMalloc(Context const*,
std::size_t n_elements) {
auto resource = std::make_shared<common::CudaMallocResource>(n_elements * sizeof(T));
auto ref = RefResourceView{resource->DataAs<T>(), n_elements, resource};
Expand Down
2 changes: 1 addition & 1 deletion src/common/resource.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class CudaMallocResource : public ResourceHandler {
}
~CudaMallocResource() noexcept(true) override { this->Clear(); }

void* Data() override { return storage_.data(); }
[[nodiscard]] void* Data() override { return storage_.data(); }
[[nodiscard]] std::size_t Size() const override { return storage_.size(); }
void Resize(std::size_t n_bytes) { this->storage_.resize(n_bytes); }
};
Expand Down
2 changes: 1 addition & 1 deletion src/data/ellpack_page.cu
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ size_t EllpackPageImpl::Copy(Context const* ctx, EllpackPageImpl const* page, bs
LOG(FATAL) << "Concatenating the same Ellpack.";
return this->n_rows * this->row_stride;
}
dh::LaunchN(num_elements, CopyPage{this, page, offset});
dh::LaunchN(num_elements, ctx->CUDACtx()->Stream(), CopyPage{this, page, offset});
monitor_.Stop(__func__);
return num_elements;
}
Expand Down

0 comments on commit 542e0ae

Please sign in to comment.