YukeWang96 / TC-GNN_ATC23

Artifact for USENIX ATC'23: TC-GNN: Bridging Sparse GNN Computation and Dense Tensor Cores on GPUs.
45 stars 13 forks source link

spmm kernel #2

Open aGoodCat opened 1 year ago

aGoodCat commented 1 year ago

Hi Yuke, What is the interface to be used to just perform SpMM? Thanks

YukeWang96 commented 1 year ago

Please follow the instructions in this subsection. https://github.com/YukeWang96/TC-GNN_ATC23#8-running-tc-gnn-in-single-kernel-comparison

black-cat-sheriff commented 1 year ago

Hello Yuke, Does the "TC-GNN in single-kernel comparison" only run one SpMM? How can I change the feature size of SpMM? Let's say we have a sparse matrix which is MK, and we want to do SpMM on a dense KN matrix. How can I set the N? I see in your python script, I can pass "dim" and "hidden" as arguments. Which one defines the output feature size(N)? If it just run one SpMM, why it needs to parameters? Thank you so much

YukeWang96 commented 1 year ago

Hi,

Single-kernel profiling uses the dataset.dim as the output feature size (N), where input and output has the same dimension. https://github.com/YukeWang96/TC-GNN_ATC23/blob/f50ffc491fb07bc78b7af8c0ffdec2b0bd7ec1a2/main_tcgnn.py#L35

https://github.com/YukeWang96/TC-GNN_ATC23/blob/f50ffc491fb07bc78b7af8c0ffdec2b0bd7ec1a2/gnn_conv.py#L179