Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 2a1caa1

Browse files
committed
do not promote to registers before promoting to shared in tests
MapperMemoryPromotionRAW and Sum4D tests call the mapping strategy with promotion to private enabled, which may insert copies to private, and promotion to shared disabled. They then call promotion to shared separately through a dedicated call to avoid using the main heuristic dependent on the shared memory size available on the current device. Therefore, promotion to shared happens after promotion to private, and neither expects that. In particular, mapCopiesToThreads is a part of the promotion to shared and expects to be called before the promotion to private happens. Do not request promotion to private in the tests that do not check for it.
1 parent dfed608 commit 2a1caa1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test_cuda_mapper_memory_promotion.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class MapperMemoryPromotion2DHelper : public TestMapper {
6666
CudaMappingOptions::makeNaiveCudaMappingOptions()
6767
.tile(tileSizes) // passing more tiling values triggers a check...
6868
.useSharedMemory(false) // do not auto-promote
69-
.usePrivateMemory(true);
69+
.usePrivateMemory(false);
7070
return makeMappedScop(tc, mappingOptions, problemSizes);
7171
}
7272
};
@@ -86,7 +86,7 @@ def fun(float(N,M,K,L) A, float(N,M,K,L) B) -> (C) {
8686
auto mappingOptions = CudaMappingOptions::makeNaiveCudaMappingOptions()
8787
.tile(tileSizes)
8888
.useSharedMemory(false) // do not autopromote
89-
.usePrivateMemory(true);
89+
.usePrivateMemory(false);
9090
auto mscop = makeMappedScop(
9191
tc,
9292
mappingOptions,

0 commit comments

Comments
 (0)