HIP icon indicating copy to clipboard operation
HIP copied to clipboard

The attribute hipFuncAttributeMaxDynamicSharedMemorySize is ignored

Open zjin-lcf opened this issue 2 years ago • 6 comments

For the attribute hipFuncAttributeMaxDynamicSharedMemorySize, the hipFuncSetAttribute may return an error when the memory size exceeds maximum dynamic shared memory size.

Reference hipDynamicShared2.cpp

zjin-lcf avatar Dec 26 '22 23:12 zjin-lcf

@zjin-lcf Hi, is your issue resolved on the latest HIP? If so can we close this ticket?

abhimeda avatar Feb 08 '24 15:02 abhimeda

No. Thanks.

zjin-lcf avatar Feb 08 '24 17:02 zjin-lcf

@zjin-lcf Internal ticket has been created to resolve this issue. Thanks!

ppanchad-amd avatar Apr 10 '24 18:04 ppanchad-amd

@zjin-lcf Can you provide more details of your setup and steps to reproduce?

alexeykondrat avatar Apr 19 '24 01:04 alexeykondrat

The file /tests/src/kernel/hipDynamicShared2.cpp shows the usage of the function.

The hipFuncSetAttribute may return an error when the memory size (SIZE) exceeds maximum dynamic shared memory size.

hipError_t ret = hipFuncSetAttribute(
        reinterpret_cast<const void*>(&vectorAdd),
        hipFuncAttributeMaxDynamicSharedMemorySize, SIZE);

zjin-lcf avatar Apr 19 '24 13:04 zjin-lcf