Merge branch 'amd-master' into amd-develop
Этот коммит содержится в:
@@ -114,8 +114,8 @@ if(HIP_PLATFORM STREQUAL "hcc")
|
||||
set(CMAKE_C_COMPILER "${HCC_HOME}/bin/hcc")
|
||||
|
||||
# Set HIP_HCC so we know this is HIP compile, some files are shared with HCC (staging_buffer).
|
||||
set(CMAKE_CXX_FLAGS " -hc -I${HCC_HOME}/include -I${HSA_PATH}/include -stdlib=libc++ -DHIP_HCC")
|
||||
set(CMAKE_C_FLAGS " -hc -I${HCC_HOME}/include -I${HSA_PATH}/include -stdlib=libc++ -DHIP_HCC")
|
||||
set(CMAKE_CXX_FLAGS " -hc -I${HCC_HOME}/include -I${HSA_PATH}/include -I/opt/rocm/libhsakmt/include/libhsakmt -stdlib=libc++ -DHIP_HCC")
|
||||
set(CMAKE_C_FLAGS " -hc -I${HCC_HOME}/include -I${HSA_PATH}/include -I/opt/rocm/libhsakmt/include/libhsakmt -stdlib=libc++ -DHIP_HCC")
|
||||
|
||||
set(SOURCE_FILES src/device_util.cpp
|
||||
src/hip_hcc.cpp
|
||||
|
||||
@@ -81,7 +81,7 @@ if ($HIP_PLATFORM eq "hcc") {
|
||||
$HIPLDFLAGS .= " -Wl,--defsym=_binary_kernel_spir_end=0 -Wl,--defsym=_binary_kernel_spir_start=0 -Wl,--defsym=_binary_kernel_cl_start=0 -Wl,--defsym=_binary_kernel_cl_end=0";
|
||||
# Satisfy HCC dependencies
|
||||
$HIPLDFLAGS .= " -lc++abi";
|
||||
$HIPLDFLAGS .= " -L$HSA_PATH/lib -L$ROCM_PATH/lib -lhsa-runtime64 -lhc_am";
|
||||
$HIPLDFLAGS .= " -L$HSA_PATH/lib -L$ROCM_PATH/lib -lhsa-runtime64 -lhc_am -lhsakmt";
|
||||
|
||||
# Add trace marker library:
|
||||
# TODO - once we cleanly separate the HIP API headers from HIP library headers this logic should move to CMakebuild option - apps do not need to see the marker library.
|
||||
|
||||
@@ -42,6 +42,7 @@ THE SOFTWARE.
|
||||
#include "hip_runtime.h"
|
||||
#include "hcc_detail/hip_hcc.h"
|
||||
#include "hsa_ext_amd.h"
|
||||
#include "hsakmt.h"
|
||||
|
||||
// TODO, re-org header order.
|
||||
extern const char *ihipErrorString(hipError_t hip_error);
|
||||
@@ -720,17 +721,18 @@ hipError_t ihipDevice_t::getProperties(hipDeviceProp_t* prop)
|
||||
prop->computeMode = 0;
|
||||
|
||||
// Get Max Threads Per Multiprocessor
|
||||
/*
|
||||
|
||||
HsaSystemProperties props;
|
||||
hsaKmtReleaseSystemProperties();
|
||||
if(HSAKMT_STATUS_SUCCESS == hsaKmtAcquireSystemProperties(&props)) {
|
||||
HsaNodeProperties node_prop = {0};
|
||||
if(HSAKMT_STATUS_SUCCESS == hsaKmtGetNodeProperties(node, &node_prop)) {
|
||||
uint32_t waves_per_cu = node_prop.MaxWavesPerSIMD;
|
||||
prop-> maxThreadsPerMultiProcessor = prop->warpsize*waves_per_cu;
|
||||
uint32_t simd_per_cu = node_prop.NumSIMDPerCU;
|
||||
prop-> maxThreadsPerMultiProcessor = prop->warpSize*waves_per_cu*simd_per_cu;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
// Get memory properties
|
||||
err = hsa_agent_iterate_regions(_hsa_agent, get_region_info, prop);
|
||||
|
||||
Ссылка в новой задаче
Block a user