SWDEV-444021 - Implement hipGetFuncBySymbol

Change-Id: I7ef13d02c5b5c6ce2386ccb92b5602d005b35988
This commit is contained in:
Satyanvesh Dittakavi
2024-02-15 09:42:48 +00:00
parent 43e2bb6126
commit 684fd60c8f
7 changed files with 61 additions and 8 deletions
+13 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2015 - 2021 Advanced Micro Devices, Inc.
/* Copyright (c) 2015 - 2024 Advanced Micro Devices, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -656,6 +656,18 @@ hipError_t hipModuleLaunchCooperativeKernelMultiDevice(hipFunctionLaunchParams*
}
hipError_t hipGetFuncBySymbol(hipFunction_t* functionPtr, const void* symbolPtr) {
HIP_INIT_API(hipGetFuncBySymbol, functionPtr, symbolPtr);
hipError_t hip_error = PlatformState::instance().getStatFunc(functionPtr,
symbolPtr, ihipGetDevice());
if ((hip_error != hipSuccess) || (functionPtr == nullptr)) {
HIP_RETURN(hipErrorInvalidDeviceFunction);
}
HIP_RETURN(hipSuccess);
}
hipError_t hipLaunchKernel_common(const void* hostFunction, dim3 gridDim, dim3 blockDim,
void** args, size_t sharedMemBytes,
hipStream_t stream) {