P4 to Git Change 1402826 by lmoriche@lmoriche_opencl_dev2 on 2017/04/26 12:05:30
SWDEV-102726 - [OCL-LC-ROCm] Open source OpenCL Runtime
- Cleanups to build with gcc 5.4 and cmake.
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/elf.cpp#37 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/elf.hpp#25 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/blit.cpp#5 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#50 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#23 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocmemory.cpp#17 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprintf.cpp#8 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#65 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#36 edit
[ROCm/clr commit: d2ca5e309d]
Tento commit je obsažen v:
@@ -175,9 +175,11 @@ isCALTarget(const char* p, signed char ec)
|
||||
machine = ((Elf64_Ehdr*)p)->e_machine;
|
||||
}
|
||||
|
||||
#if !defined(WITH_LIGHTNING_COMPILER)
|
||||
if ( (machine >= OclElf::CAL_FIRST) && (machine <= OclElf::CAL_LAST) ) {
|
||||
return true;
|
||||
}
|
||||
#endif // !defined(WITH_LIGHTNING_COMPILER)
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -622,10 +624,13 @@ OclElf::getTarget(uint16_t& machine, oclElfPlatform& platform)
|
||||
platform = CPU_PLATFORM;
|
||||
machine = mach - CPU_BASE;
|
||||
}
|
||||
#if !defined(WITH_LIGHTNING_COMPILER)
|
||||
else if ( (mach >= CAL_FIRST) && (mach <= CAL_LAST)) {
|
||||
platform = CAL_PLATFORM;
|
||||
machine = mach - CAL_BASE;
|
||||
} else if (mach == EM_386
|
||||
}
|
||||
#endif // !defined(WITH_LIGHTNING_COMPILER)
|
||||
else if (mach == EM_386
|
||||
|| mach == EM_HSAIL
|
||||
|| mach == EM_HSAIL_64
|
||||
|| mach == EM_AMDIL
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
#include "top.hpp"
|
||||
#include "elf_utils.hpp"
|
||||
#if !defined(WITH_LIGHTNING_COMPILER)
|
||||
#include "caltarget.h" // using CALtargetEnum
|
||||
#endif // !defined(WITH_LIGHTNING_COMPILER)
|
||||
|
||||
#include "libelf.h"
|
||||
#include "gelf.h"
|
||||
@@ -23,6 +25,9 @@
|
||||
#ifndef EM_HSAIL
|
||||
#define EM_HSAIL 0xAF5A
|
||||
#endif
|
||||
#ifndef EM_HSAIL_64
|
||||
#define EM_HSAIL_64 0xAF5B
|
||||
#endif
|
||||
#ifndef EM_AMDIL
|
||||
#define EM_AMDIL 0x4154
|
||||
#endif
|
||||
@@ -66,9 +71,11 @@ public:
|
||||
typedef enum {
|
||||
// NOTE!!! Never remove an entry or change the order.
|
||||
|
||||
#if !defined(WITH_LIGHTNING_COMPILER)
|
||||
// All CAL targets are within [CAL_FIRST, CAL_LAST].
|
||||
CAL_FIRST = CAL_TARGET_600 + CAL_BASE,
|
||||
CAL_LAST = CAL_TARGET_LAST + CAL_BASE,
|
||||
#endif // !defined(WITH_LIGHTNING_COMPILER)
|
||||
|
||||
// All CPU targets are within [CPU_FIRST, CPU_LAST]
|
||||
CPU_FIRST = CPU_FEATURES_FIRST + CPU_BASE,
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#include "device/blit.hpp"
|
||||
#include "utils/debug.hpp"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
namespace device {
|
||||
|
||||
HostBlitManager::HostBlitManager(VirtualDevice& vDev, Setup setup)
|
||||
@@ -643,7 +645,7 @@ cl_uint HostBlitManager::sRGBmap(float fc) const {
|
||||
double c = (double)fc;
|
||||
|
||||
#ifdef ATI_OS_LINUX
|
||||
if (isnan(c)) c = 0.0;
|
||||
if (std::isnan(c)) c = 0.0;
|
||||
#else
|
||||
if (_isnan(c)) c = 0.0;
|
||||
#endif
|
||||
|
||||
@@ -25,11 +25,6 @@
|
||||
#endif // !defined(WITH_LIGHTNING_COMPILER)
|
||||
#include "device/rocm/rocmemory.hpp"
|
||||
#include "device/rocm/rocglinterop.hpp"
|
||||
#include "kv_id.h"
|
||||
#include "vi_id.h"
|
||||
#include "cz_id.h"
|
||||
#include "ci_id.h"
|
||||
#include "ai_id.h"
|
||||
#include <cstring>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
//
|
||||
|
||||
#include "rockernel.hpp"
|
||||
#include "SCHSAInterface.h"
|
||||
#include "amd_hsa_kernel_code.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "thread/monitor.hpp"
|
||||
#include "platform/memory.hpp"
|
||||
#include "platform/sampler.hpp"
|
||||
#include "api/opencl/amdocl/cl_gl_amd.hpp"
|
||||
#include "amdocl/cl_gl_amd.hpp"
|
||||
|
||||
namespace roc {
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "device/rocm/rocprintf.hpp"
|
||||
#include <cstdio>
|
||||
#include <algorithm>
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
|
||||
namespace roc {
|
||||
|
||||
@@ -165,13 +165,13 @@ size_t PrintfDbg::outputArgument(const std::string& fmt, bool printFloat, size_t
|
||||
}
|
||||
float fArg = *(reinterpret_cast<const float*>(argument));
|
||||
float fSign = copysign(1.0, fArg);
|
||||
if (isinf(fArg) && !isnan(fArg)) {
|
||||
if (std::isinf(fArg) && !std::isnan(fArg)) {
|
||||
if (fSign < 0) {
|
||||
amd::Os::printf(fmtF.data(), "-infinity");
|
||||
} else {
|
||||
amd::Os::printf(fmtF.data(), "infinity");
|
||||
}
|
||||
} else if (isnan(fArg)) {
|
||||
} else if (std::isnan(fArg)) {
|
||||
if (fSign < 0) {
|
||||
amd::Os::printf(fmtF.data(), "-nan");
|
||||
} else {
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
|
||||
#include "rocprogram.hpp"
|
||||
|
||||
#include "compiler/lib/utils/options.hpp"
|
||||
#include "utils/options.hpp"
|
||||
#include "rockernel.hpp"
|
||||
#if defined(WITH_LIGHTNING_COMPILER)
|
||||
#include "AMDGPUPTNote.h"
|
||||
#include "libelf/gelf.h"
|
||||
#include "driver/AmdCompiler.h"
|
||||
#include "libraries.amdgcn.inc"
|
||||
#include <gelf.h>
|
||||
#else // !defined(WITH_LIGHTNING_COMPILER)
|
||||
#include "roccompilerlib.hpp"
|
||||
#include "amd_hsa_code.hpp"
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include "platform/sampler.hpp"
|
||||
#include "utils/debug.hpp"
|
||||
#include "os/os.hpp"
|
||||
#include "SCHSAInterface.h"
|
||||
#include "amd_hsa_kernel_code.h"
|
||||
|
||||
#include <fstream>
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele