From 301ae0fa90bc9e38b4d77b25f656f702ee8457cd Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Sun, 4 Sep 2016 16:25:02 +0530 Subject: [PATCH] hip_kernel_language.md: Update documentation for kernel compilation Change-Id: I51073363c3e8a8837c5fe2ae5a04dae0d441229e [ROCm/hip commit: b8495e5961ef6826b6999c48696eff95878c704a] --- projects/hip/docs/markdown/hip_kernel_language.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/projects/hip/docs/markdown/hip_kernel_language.md b/projects/hip/docs/markdown/hip_kernel_language.md index c9df5ce1b1..628cd36c26 100644 --- a/projects/hip/docs/markdown/hip_kernel_language.md +++ b/projects/hip/docs/markdown/hip_kernel_language.md @@ -678,14 +678,5 @@ The file format for binary is `.co` which means Code Object. The following comma [INPUT FILE] = Name of the file containing kernels [OUTPUT FILE] = Name of the generated code object file``` -Note that the kernel file should have `int main(){}` at the end it so that the binary is generated. This happens because HCC generates binaries at linking time rather than compilation. - -To load a kernel into HIP, we need both the code object and the name of the kernel stored within the code object. -In order to get name of the kernel, use: -``` -$ objdump -x [CODE_OBJECT_FILE]`. -``` -CODE_OBJECT_FILE is file generated by hipcc during kernel compilation. The output from objdump has symbol to the kernel whose name is mangled with `grid_launch_parm`, `__functor`, `__cxxamp_trampoline`. An example of how it looks is `ZN12_GLOBAL__N_137_Z3Cpy16grid_launch_parmPfS0__functor19__cxxamp_trampolineEiiiiiiPKfPf` where `Cpy` is the name of the kernel written in C++. The hipLoadKernelModule API needs to specify this mangled name on the HIP/hcc path. -