Question about moving memory allocation from the heap to the stack (original) (raw)
August 18, 2024, 10:07am 1
Hi,
I have written some simple offload code that calculates a vector sum.
When compiling, I received a remark as below:
clang++ -fopenmp -fopenmp-targets=nvptx64 offload.cpp -O3 -Rpass=openmp-opt
remark: Moving memory allocation from the heap to the stack. [-Rpass=openmp-opt]
I’m curious about this remark and how it differs from [OMP110] Moving globalized variable to the stack.
Are these the same optimizations? For instance, does “heap” and “globalized variable” refer to data in the GPU’s global memory, while “stack” indicates the thread’s private registers?
Thanks.