Skip to content

Commit 8abc532

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 8abc532

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

test/integ/sharedMem/src/sharedMem.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class SharedMemKernel
2222
{
2323
public:
2424
ALPAKA_NO_HOST_ACC_WARNING
25+
2526
template<typename TAcc>
2627
ALPAKA_FN_ACC auto operator()(TAcc const& acc, Val* const puiBlockRetVals) const -> void
2728
{
@@ -94,11 +95,11 @@ namespace alpaka::trait
9495
template<typename TVec, typename... TArgs>
9596
ALPAKA_FN_HOST_ACC static auto getBlockSharedMemDynSizeBytes(
9697
SharedMemKernel<TnumUselessWork, Val> const& /* sharedMemKernel */,
97-
TVec const& blockThreadExtent,
98+
TVec const& /* blockThreadExtent */,
9899
TVec const& threadElemExtent,
99100
TArgs&&...) -> std::size_t
100101
{
101-
return static_cast<std::size_t>(blockThreadExtent.prod() * threadElemExtent.prod()) * sizeof(Val);
102+
return static_cast<std::size_t>(threadElemExtent.prod()) * sizeof(Val);
102103
}
103104
};
104105
} // namespace alpaka::trait

0 commit comments

Comments
 (0)