Skip to content

Commit a830760

Browse files
fix shared memory test
The integration test for shared memory was allocating shared memory for the full grid instead of the block only. The amount on exeets the typical available 64kiB, it was only passing because on CPU we allocate dynamic shared memory via `new` and it looks like on GPU there is no test.
1 parent b62a91a commit a830760

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/integ/sharedMem/src/sharedMem.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ namespace alpaka::trait
9494
template<typename TVec, typename... TArgs>
9595
ALPAKA_FN_HOST_ACC static auto getBlockSharedMemDynSizeBytes(
9696
SharedMemKernel<TnumUselessWork, Val> const& /* sharedMemKernel */,
97-
TVec const& blockThreadExtent,
97+
TVec const& /* blockThreadExtent */,
9898
TVec const& threadElemExtent,
9999
TArgs&&...) -> std::size_t
100100
{
101-
return static_cast<std::size_t>(blockThreadExtent.prod() * threadElemExtent.prod()) * sizeof(Val);
101+
return static_cast<std::size_t>(threadElemExtent.prod()) * sizeof(Val);
102102
}
103103
};
104104
} // namespace alpaka::trait

0 commit comments

Comments
 (0)