From a39ab85e044bc65a12a822e854baeca39aaf1c01 Mon Sep 17 00:00:00 2001 From: Satyanvesh Dittakavi Date: Tue, 21 Jun 2022 12:04:48 +0000 Subject: [PATCH] SWDEV-340226 - hiprtcLinkAddData should allow empty name Change-Id: I2c9a53453223ee4899b0a5d05e1097bc7e0e428e --- hipamd/src/hiprtc/hiprtc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hipamd/src/hiprtc/hiprtc.cpp b/hipamd/src/hiprtc/hiprtc.cpp index b750967f68..4ed05d8608 100644 --- a/hipamd/src/hiprtc/hiprtc.cpp +++ b/hipamd/src/hiprtc/hiprtc.cpp @@ -277,11 +277,11 @@ hiprtcResult hiprtcLinkAddData(hiprtcLinkState hip_link_state, hiprtcJITInputTyp HIPRTC_INIT_API(hip_link_state, image, image_size, name, num_options, options_ptr, option_values); - if (image == nullptr || image_size <= 0 || name == nullptr) { + if (image == nullptr || image_size <= 0) { HIPRTC_RETURN(HIPRTC_ERROR_INVALID_INPUT); } - if (input_type == HIPRTC_JIT_INPUT_CUBIN || input_type == HIPRTC_JIT_INPUT_PTX + if (input_type == HIPRTC_JIT_INPUT_CUBIN || input_type == HIPRTC_JIT_INPUT_PTX || input_type == HIPRTC_JIT_INPUT_FATBINARY || input_type == HIPRTC_JIT_INPUT_OBJECT || input_type == HIPRTC_JIT_INPUT_LIBRARY || input_type == HIPRTC_JIT_INPUT_NVVM) { HIPRTC_RETURN(HIPRTC_ERROR_INVALID_INPUT);