Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions source/lib/src/rocm/tabulate.hip.cu
Original file line number Diff line number Diff line change
Expand Up @@ -524,15 +524,6 @@ __global__ void tabulate_fusion_se_r_grad_fifth_order_polynomial(
int warp_idx = __shfl(threadIdx.x / 64, 0);
int lane_idx = threadIdx.x % 64;

bool unloop = false;
FPTYPE * iteratorA = (FPTYPE *)&_data[0]; // dy
for (int ii = 0; ii < MTILE; ii++) {
for (int jj = thread_idx; jj < last_layer_size; jj += blockDim.x) {
iteratorA[ii * last_layer_size + jj] = ;
}
}
__syncthreads();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure that this line should also be removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there are no shared memory access operations

Copy link
Member

@njzjz njzjz Apr 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering - I do see this line in CUDA implementation

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering - I do see this line in CUDA implementation

The __syncthreads function is used to synchronise threads within the entire CUDA block, but these threads do not conflict with each other under the current implementation(There is a conflict in the previous implementation, and it is a waste to keep this __syncthreads), so this function is no longer needed.


for (int ii = 0; ii < nnei; ii += KTILE) {
FPTYPE xx = em[block_idx * nnei + ii + warp_idx];

Expand Down
2 changes: 1 addition & 1 deletion source/lib/tests/test_tabulate_se_r.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ TEST_F(TestTabulateSeR, tabulate_fusion_se_r_grad_gpu_rocm)
std::vector<double> dy_dem(em.size(), 0.0);
std::vector<double> dy(nloc * nnei * last_layer_size, 1.0);

* dy_dem_dev = NULL, * table_dev = NULL, * em_dev = NULL, * dy_dev = NULL;
double * dy_dem_dev = NULL, * table_dev = NULL, * em_dev = NULL, * dy_dev = NULL;
deepmd::malloc_device_memory_sync(dy_dem_dev, dy_dem);
deepmd::malloc_device_memory_sync(table_dev, table);
deepmd::malloc_device_memory_sync(em_dev, em);
Expand Down