diff --git a/projects/clr/hipamd/src/CMakeLists.txt b/projects/clr/hipamd/src/CMakeLists.txt index 887499b7ab..b840f43461 100644 --- a/projects/clr/hipamd/src/CMakeLists.txt +++ b/projects/clr/hipamd/src/CMakeLists.txt @@ -96,7 +96,6 @@ if(NOT WIN32) endif() target_sources(amdhip64 PRIVATE - fixme.cpp hip_activity.cpp hip_code_object.cpp hip_context.cpp diff --git a/projects/clr/hipamd/src/fixme.cpp b/projects/clr/hipamd/src/fixme.cpp deleted file mode 100644 index 9ea3876427..0000000000 --- a/projects/clr/hipamd/src/fixme.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (c) 2015 - 2021 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 - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. */ - -#include "vdi_common.hpp" -#ifdef _WIN32 -#include -#include -#include -#include -#include -#include -#endif -#include - -cl_icd_dispatch amd::ICDDispatchedObject::icdVendorDispatch_[] = {0}; -amd::PlatformIDS amd::PlatformID::Platform = {amd::ICDDispatchedObject::icdVendorDispatch_}; diff --git a/projects/clr/opencl/amdocl/cl_icd.cpp b/projects/clr/opencl/amdocl/cl_icd.cpp index 43179e440c..16ad71a025 100644 --- a/projects/clr/opencl/amdocl/cl_icd.cpp +++ b/projects/clr/opencl/amdocl/cl_icd.cpp @@ -29,9 +29,6 @@ #include -amd::PlatformIDS amd::PlatformID::Platform = //{ NULL }; - {amd::ICDDispatchedObject::icdVendorDispatch_}; - static cl_int CL_API_CALL icdGetPlatformInfo(cl_platform_id platform, cl_platform_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) { diff --git a/projects/clr/rocclr/include/vdi_common.hpp b/projects/clr/rocclr/include/vdi_common.hpp index 33a5823635..2272106e61 100644 --- a/projects/clr/rocclr/include/vdi_common.hpp +++ b/projects/clr/rocclr/include/vdi_common.hpp @@ -101,7 +101,7 @@ struct PlatformIDS { }; class PlatformID { public: - static PlatformIDS Platform; + static inline PlatformIDS Platform = {amd::ICDDispatchedObject::icdVendorDispatch_}; }; #define AMD_PLATFORM (reinterpret_cast(&amd::PlatformID::Platform)) diff --git a/projects/clr/rocclr/platform/object.hpp b/projects/clr/rocclr/platform/object.hpp index 27af5f4f89..d6643e01e6 100644 --- a/projects/clr/rocclr/platform/object.hpp +++ b/projects/clr/rocclr/platform/object.hpp @@ -27,6 +27,15 @@ #include "os/alloc.hpp" #include "thread/monitor.hpp" #include "utils/util.hpp" +#ifdef _WIN32 +#include +#include +#include +#include +#include +#include +#endif +#include #define KHR_CL_TYPES_DO(F) \ @@ -124,7 +133,11 @@ CL_TYPES_DO(DEFINE_CL_TRAITS); //! \endcond struct ICDDispatchedObject { +#ifdef __HIP_PLATFORM_AMD__ + static inline cl_icd_dispatch icdVendorDispatch_[] = {0}; +#else static cl_icd_dispatch icdVendorDispatch_[]; +#endif const cl_icd_dispatch* const dispatch_; protected: