level-zero icon indicating copy to clipboard operation
level-zero copied to clipboard

zeModuleGetGlobalPointer can not get correct size of global variable

Open jz10 opened this issue 4 years ago • 2 comments

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 avatar May 24 '21 16:05 jz10

Hi @jz10 : to confirm: this is about incorrect implementation, rather than incorrect documentation or errors in the specification, right? If so, could you open the issue in https://github.com/intel/compute-runtime, where the L0 driver implementation is hosted?

jandres742 avatar May 24 '21 16:05 jandres742

sure, thanks

jz10 avatar May 24 '21 17:05 jz10