From 1342f1c2fd0df648d5cb32d5d72fbba81f96720d Mon Sep 17 00:00:00 2001 From: ROCm CI Service Account <66695075+rocm-ci@users.noreply.github.com> Date: Fri, 17 Jun 2022 10:41:14 +0530 Subject: [PATCH] SWDEV-339995 - Adding hiprtcGetBitcode and hiprtcGetBitcodeSize. (#2744) Change-Id: I90ef8c90418ec3a1bcb596d513c1e77031fe77eb --- include/hip/hiprtc.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/include/hip/hiprtc.h b/include/hip/hiprtc.h index 9d4a598e01..61f7649305 100644 --- a/include/hip/hiprtc.h +++ b/include/hip/hiprtc.h @@ -269,6 +269,29 @@ hiprtcResult hiprtcGetCode(hiprtcProgram prog, char* code); */ hiprtcResult hiprtcGetCodeSize(hiprtcProgram prog, size_t* codeSizeRet); +/** + * @brief Gets the pointer of compiled bitcode by the runtime compilation program instance. + * + * @param [in] prog runtime compilation program instance. + * @param [out] code char pointer to bitcode. + * @return HIPRTC_SUCCESS + * + * @see hiprtcResult + */ +hiprtcResult hiprtcGetBitcode(hiprtcProgram prog, char* bitcode); + +/** + * @brief Gets the size of compiled bitcode by the runtime compilation program instance. + * + * + * @param [in] prog runtime compilation program instance. + * @param [out] code the size of bitcode. + * @return HIPRTC_SUCCESS + * + * @see hiprtcResult + */ +hiprtcResult hiprtcGetBitcodeSize(hiprtcProgram prog, size_t* bitcode_size); + /** * @brief Creates the link instance via hiprtc APIs. *