Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify version of Clang-format #851

Merged
merged 2 commits into from
Sep 24, 2024
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
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,5 @@ repos:
language: python
files: \.(c|cc|cxx|cpp|cl|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|mm|proto|textproto|vert)$
args: ['-i', '-fallback-style=none', '--style=file']
additional_dependencies: ['clang-format']
# specify version since clang-format is not stable version-to-version
additional_dependencies: ['clang-format~=19.1.0']
2 changes: 1 addition & 1 deletion src/acc/libsmm_acc/kernels/smm_acc_dnt_medium.h
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ __global__ void __launch_bounds__(threads, minblocks) smm_acc_dnt_medium(const i
}
if (need_sync) syncthreads();

/* Add results from shared memory buffer to global C block. */
/* Add results from shared memory buffer to global C block. */
#pragma unroll
for (int i = tidx; i < mn; i += threads) {
atomicAdd(&c_data[srcC + i], buff[i]);
Expand Down
4 changes: 2 additions & 2 deletions src/acc/libsmm_acc/kernels/smm_acc_dnt_small.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ __global__ void __launch_bounds__(threads, minblocks) smm_acc_dnt_small(const in
nrun = grouping;
if (((bidx + 1) * grouping) > stack_size) nrun = stack_size % grouping;

/* Set the partial sum (tile T) to zero */
/* Set the partial sum (tile T) to zero */
#pragma unroll
for (int i = 0; i < M * N; i++) myc[i] = 0.0;

Expand Down Expand Up @@ -203,7 +203,7 @@ __global__ void __launch_bounds__(threads, minblocks) smm_acc_dnt_small(const in

if (need_sync) syncthreads();

/* Add results from shared memory buffer to global C block. */
/* Add results from shared memory buffer to global C block. */
#pragma unroll
for (int i = tidx; i < mn; i += threads) atomicAdd(&c_data[srcC + i], buff[i]);
}
Expand Down
2 changes: 1 addition & 1 deletion src/acc/opencl/smm/opencl_libsmm.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ int opencl_libsmm_read_smm_params(char* parambuf, opencl_libsmm_smmkey_t* key, o
LIBXSMM_MEMZERO127(key); /* potentially heterogeneous key-data (alignment gaps) */
memset(value, 0, sizeof(opencl_libsmm_smm_t));
for (; NULL != s;
++i, s = (c != consumed ? ((s + 1) < end ? strtok((s + 1) + strlen(s), ACC_OPENCL_DELIMS) : NULL) : s), c = consumed)
++i, s = (c != consumed ? ((s + 1) < end ? strtok((s + 1) + strlen(s), ACC_OPENCL_DELIMS) : NULL) : s), c = consumed)
{
switch (i) {
case 0:
Expand Down