zeModuleGetGlobalPointer can not get correct size of global variable
When we invoked zeModuleGetGlobalPointer to retrieve the size of global variable specified by the 2nd argument (which is a string for global variable's name) , zeModuleGetGlobalPointer just returned 0 in the 3rd argument, but gave correct device visible pointer in the 4th argument.
We referred to the description at: https://spec.oneapi.com/level-zero/latest/core/api.html?highlight=globalpointer#zemodulegetglobalpointer . The L0 module was create by adding the compilation flag '-cl-std=CL2.0 -cl-take-global-address'
We tried the definition of global variable as scalar type or array type, neither of their size can be retrieved via zeModuleGetGlobalPointer correctly.
@jz10 : I think we have a bug on this interface previously, that we already fixed. Do you have a reproducer we can take a look at?
I was working on the L0 built from this March, maybe I should update to newer version?
Yes, let's try with latest release, to confirm.
Fix for this issue was merged on 18 March: https://github.com/intel/compute-runtime/commit/0897f997d68a4608cdf0a5c8c0b43ffe19a79169
please verify with this commit
Since a fix was provided, I'm closing this. Please re-open if still reoccuring and thank you for the report.