Skip to content

Commit

Permalink
fixing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
viclafargue committed Jan 30, 2025
1 parent a58ffcb commit 1d10f72
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cpp/include/raft/sparse/linalg/degree.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace linalg {
template <typename T = int, typename nnz_type, typename outT>
void coo_degree(const T* rows, nnz_type nnz, outT* results, cudaStream_t stream)
{
detail::coo_degree<64, T>(rows, (nnz_type)nnz, results, stream);
detail::coo_degree<64, T>(rows, nnz, results, stream);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions cpp/include/raft/sparse/linalg/detail/spectral.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void fit_embedding(raft::resources const& handle,
rows,
cols,
vals,
static_cast<int>(nnz),
static_cast<uint64_t>(nnz),
static_cast<int>(n),
src_offsets.data(),
dst_cols.data(),
Expand All @@ -72,7 +72,7 @@ void fit_embedding(raft::resources const& handle,
value_type* vs = dst_vals.data();

raft::spectral::matrix::sparse_matrix_t<index_type, value_type> const r_csr_m{
handle, ro, ci, vs, static_cast<int>(n), nnz};
handle, ro, ci, vs, static_cast<index_type>(n), static_cast<uint64_t>(nnz)};

index_type neigvs = n_components + 1;
index_type maxiter = 4000; // default reset value (when set to 0);
Expand Down
6 changes: 3 additions & 3 deletions cpp/include/raft/sparse/op/detail/filter.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ void coo_remove_scalar(COO<T, idx_t, nnz_t>* in,
rmm::device_uvector<nnz_t> row_count_nz(in->n_rows, stream);
rmm::device_uvector<nnz_t> row_count(in->n_rows, stream);

RAFT_CUDA_TRY(cudaMemsetAsync(row_count_nz.data(), 0, (idx_t)in->n_rows * sizeof(idx_t), stream));
RAFT_CUDA_TRY(cudaMemsetAsync(row_count.data(), 0, (idx_t)in->n_rows * sizeof(idx_t), stream));
RAFT_CUDA_TRY(cudaMemsetAsync(row_count_nz.data(), 0, (nnz_t)in->n_rows * sizeof(nnz_t), stream));
RAFT_CUDA_TRY(cudaMemsetAsync(row_count.data(), 0, (nnz_t)in->n_rows * sizeof(nnz_t), stream));

linalg::coo_degree(in->rows(), in->nnz, row_count.data(), stream);
RAFT_CUDA_TRY(cudaPeekAtLastError());
Expand All @@ -164,7 +164,7 @@ void coo_remove_scalar(COO<T, idx_t, nnz_t>* in,
RAFT_CUDA_TRY(cudaPeekAtLastError());

thrust::device_ptr<nnz_t> d_row_count_nz = thrust::device_pointer_cast(row_count_nz.data());
uint64_t out_nnz =
nnz_t out_nnz =
thrust::reduce(rmm::exec_policy(stream), d_row_count_nz, d_row_count_nz + in->n_rows);

out->allocate(out_nnz, in->n_rows, in->n_cols, false, stream);
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/sparse/op/filter.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ template <typename T, typename idx_t, typename nnz_t>
void coo_remove_scalar(const idx_t* rows,
const idx_t* cols,
const T* vals,
int nnz,
nnz_t nnz,
idx_t* crows,
idx_t* ccols,
T* cvals,
Expand Down

0 comments on commit 1d10f72

Please sign in to comment.