Skip to content

Commit

Permalink
profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
Guangxuan-Xiao committed Jun 21, 2021
1 parent 3ce6344 commit 86e40cd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Binary file modified prof/arxiv-256.nvprof
Binary file not shown.
2 changes: 1 addition & 1 deletion script/prof.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
source /home/spack/spack/share/spack/setup-env.sh
spack load cuda
srun nvprof -o ../prof/${1}-${2}.nvprof ~/PA4_build/test/unit_tests --dataset $1 --datadir ~/PA4/data/ --len $2
srun nvprof -f -o ../prof/${1}-${2}.nvprof ~/PA4_build/test/unit_tests --dataset $1 --datadir ~/PA4/data/ --len $2
4 changes: 3 additions & 1 deletion src/spmm_opt.cu
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "spmm_opt.h"
#include <stdio.h>
#include <cuda.h>

#include <cuda_profiler_api.h>
const int BLOCK_X = 4;
const int BLOCK_Y = 32;
const int NUM_THREADS = BLOCK_X * BLOCK_Y;
Expand Down Expand Up @@ -95,5 +95,7 @@ void SpMMOpt::run(float *vin, float *vout)
// printf("num_v = %d, feat_in = %d\n", num_v, feat_in);
// printf("Grid = <%d, %d, %d>\n", grid.x, grid.y, grid.z);
// printf("Block = <%d, %d, %d>\n", block.x, block.y, block.z);
cudaProfilerStart();
spmm_kernel_merge<<<grid, block>>>(d_ptr, d_idx, d_val, vin, vout, num_v, feat_in);
cudaProfilerStop();
}

0 comments on commit 86e40cd

Please sign in to comment.