Skip to content

Commit

Permalink
prepare 0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ZenoTan committed Oct 30, 2021
1 parent dd6ef68 commit 6553b53
Show file tree
Hide file tree
Showing 15 changed files with 598 additions and 465 deletions.
19 changes: 19 additions & 0 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ cd $(dirname $0)/..
list_py_srcs() {
find ./benchmarks -type f | grep .py$
find ./srcs/python -type f | grep .py$
find ./tests/python -type f | grep .py$
}

list_cpp_srcs() {
find ./srcs/cpp -type f | grep .cpp$
find ./srcs/cpp -type f | grep .hpp$
find ./srcs/cpp -type f | grep .cu$
}

fmt_py() {
Expand All @@ -15,12 +22,24 @@ fmt_py() {
yapf -i $1
}

fmt_cpp() {
clang-format -i $1
}

fmt_all_py() {
for src in $(list_py_srcs); do
echo "fmt_py $src"
fmt_py $src
done
}

fmt_all_cpp() {
for src in $(list_cpp_srcs); do
echo "fmt_py $src"
fmt_cpp $src
done
}

# TODO: also format c++ code
fmt_all_py
fmt_all_cpp
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ def create_extension(with_cuda=False):

setup(
name='torch_quiver',
version='0.0.23',
version='0.1.0',
author='Zeyuan Tan',
author_email='[email protected]',
url='https://github.com/xpex-ai/gpex',
url='https://github.com/quiver-team/torch-quiver',
description=('Distributed Graph Learning Library for Pytorch Geometric'),
keywords=['pytorch', 'distributed', 'graph'],
license='Apache',
Expand Down
18 changes: 0 additions & 18 deletions srcs/cpp/include/quiver/cuda_random.cu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,6 @@

constexpr int WARP_SIZE = 32;

/**
* @brief Perform row-wise sampling on a CSR matrix, and generate a COO matrix,
* without replacement.
*
* @tparam T The ID type used for matrices.
* @tparam BLOCK_ROWS The number of rows covered by each threadblock.
* @param rand_seed The random seed to use.
* @param num_picks The number of non-zeros to pick per row.
* @param num_rows The number of rows to pick.
* @param in_rows The set of rows to pick.
* @param in_ptr The indptr array of the input CSR.
* @param in_index The indices array of the input CSR.
* @param data The data array of the input CSR.
* @param out_ptr The offset to write each row to in the output COO.
* @param out_rows The rows of the output COO (output).
* @param out_cols The columns of the output COO (output).
* @param out_idxs The data array of the output COO (output).
*/
template <typename T, int BLOCK_WARPS, int TILE_SIZE>
__global__ void CSRRowWiseSampleKernel(
const uint64_t rand_seed, int num_picks, const int64_t num_rows,
Expand Down
Loading

0 comments on commit 6553b53

Please sign in to comment.