NVPTX annotation metadata emission

Hi everybody,

I have noticed that the new NVPTX backend requires new metadata to identify the kernels in the module:

define void @metadata_kernel(float* %a) {
ret void
}

!nvvm.annotations = !{!1}
!1 = metadata !{void (float*)* @metadata_kernel, metadata !“kernel”, i32 1}

Is clang going to support the emission of this metadata soon ? Or do I have to write it on my own ? :slight_smile:

Thanks,
Alberto

This new metadata format is currently optional. The old ptx_kernel calling convention should still work.

The only thing you should have to change when converting from PTX -> NVPTX is the address space map. The calling conventions and intrinsics should be compatible with both.

Oh yes the toolchain is working fine.
I was just thinking about the frontend support.

Thank you Justin,

Cheers,
Alberto