Skip to content

【比赛2025秋】T1-1-2#1115

Open
PanZezhong1725 wants to merge 2 commits intomainfrom
issue/1031_T1-1-2
Open

【比赛2025秋】T1-1-2#1115
PanZezhong1725 wants to merge 2 commits intomainfrom
issue/1031_T1-1-2

Conversation

@PanZezhong1725
Copy link
Copy Markdown
Collaborator

No description provided.

@PanZezhong1725
Copy link
Copy Markdown
Collaborator Author

cpu
image
nv
image
maca
image
hpcc
image
moore (avgpool 3d 未实现)
image

@PanZezhong1725 PanZezhong1725 marked this pull request as ready for review April 2, 2026 03:22
@PanZezhong1725 PanZezhong1725 requested review from a team, Ziminli and voltjia April 2, 2026 03:22
Comment on lines +8 to +36
// Dot product kernel: computes dot(a, b) = sum(a * b)
// template <unsigned int BLOCK_SIZE, typename Tdata, typename Tcompute>
// __global__ void dot_kernel(
// Tcompute *result,
// const Tdata *a,
// const Tdata *b,
// size_t n,
// ptrdiff_t a_stride,
// ptrdiff_t b_stride) {

// Tcompute sum = 0;

// // Each thread computes partial dot product
// for (size_t i = threadIdx.x; i < n; i += BLOCK_SIZE) {
// Tcompute a_val = Tcompute(a[i * a_stride]);
// Tcompute b_val = Tcompute(b[i * b_stride]);
// sum += a_val * b_val;
// }

// // Use CUB block-level reduction
// using BlockReduce = cub::BlockReduce<Tcompute, BLOCK_SIZE>;
// __shared__ typename BlockReduce::TempStorage temp_storage;
// Tcompute block_sum = BlockReduce(temp_storage).Sum(sum);

// // Write result (only thread 0, since we only launch 1 block)
// if (threadIdx.x == 0) {
// *result = block_sum;
// }
// }
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

这个是不是应该去掉了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants