c99d679c9e
SWDEV-86035 - Add OCL backend for PAL - PAL backend build is disabled by default. "BUILD_PAL_DEVICE = yes" enables the build. You also have to update the client workspace with PAL mapping: //depot/stg/pal/... //<your_opencl_location>/runtime/device/pal/palbe/... Affected files ... ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/build/Makefile.api#130 edit ... //depot/stg/opencl/drivers/opencl/compiler/sclibdefs.opencl#8 edit ... //depot/stg/opencl/drivers/opencl/opencldefs#166 edit ... //depot/stg/opencl/drivers/opencl/openclrules#91 edit ... //depot/stg/opencl/drivers/opencl/runtime/Makefile#21 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#192 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/Makefile#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/build/Makefile#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/build/Makefile.pal#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palappprofile.cpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palappprofile.hpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbinary.cpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbinary.hpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palblit.cpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palblit.hpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palcompiler.cpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palconstbuf.cpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palconstbuf.hpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palcounters.cpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palcounters.hpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldebugger.hpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldebugmanager.cpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldebugmanager.hpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldefs.hpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.hpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldeviced3d10.cpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldeviced3d11.cpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldeviced3d9.cpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevicegl.cpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.hpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palmemory.cpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palmemory.hpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprintf.cpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprintf.hpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.hpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palresource.cpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palresource.hpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsched.hpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palschedcl.cpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.cpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.hpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palthreadtrace.cpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palthreadtrace.hpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paltimestamp.cpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paltimestamp.hpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paltrap.hpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.hpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palwavelimiter.cpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palwavelimiter.hpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/runtimedefs#36 edit ... //depot/stg/opencl/drivers/opencl/runtime/top.hpp#23 edit
129 líneas
5.4 KiB
C++
129 líneas
5.4 KiB
C++
//
|
|
// Copyright (c) 2015 Advanced Micro Devices, Inc. All rights reserved.
|
|
//
|
|
#ifndef PALSETTINGS_HPP_
|
|
#define PALSETTINGS_HPP_
|
|
|
|
#include "top.hpp"
|
|
#include "library.hpp"
|
|
#include "inc\core\palDevice.h"
|
|
|
|
/*! \addtogroup pal PAL Resource Implementation
|
|
* @{
|
|
*/
|
|
|
|
//! PAL Device Implementation
|
|
namespace pal {
|
|
|
|
//! Device settings
|
|
class Settings : public device::Settings
|
|
{
|
|
public:
|
|
//! Debug GPU flags
|
|
enum DebugGpuFlags
|
|
{
|
|
CheckForILSource = 0x00000001,
|
|
StubCLPrograms = 0x00000002, //!< Enables OpenCL programs stubbing
|
|
LockGlobalMemory = 0x00000004,
|
|
};
|
|
|
|
enum BlitEngineType
|
|
{
|
|
BlitEngineDefault = 0x00000000,
|
|
BlitEngineHost = 0x00000001,
|
|
BlitEngineCAL = 0x00000002,
|
|
BlitEngineKernel = 0x00000003,
|
|
};
|
|
|
|
enum HostMemFlags
|
|
{
|
|
HostMemDisable = 0x00000000,
|
|
HostMemBuffer = 0x00000001,
|
|
HostMemImage = 0x00000002,
|
|
};
|
|
|
|
union {
|
|
struct {
|
|
uint singleHeap_: 1; //!< Device will use a preallocated heap
|
|
uint remoteAlloc_: 1; //!< Allocate remote memory for the heap
|
|
uint stagedXferRead_: 1; //!< Uses a staged buffer read
|
|
uint stagedXferWrite_: 1; //!< Uses a staged buffer write
|
|
uint disablePersistent_: 1; //!< Disables using persistent memory for staging
|
|
uint imageSupport_: 1; //!< Report images support
|
|
uint doublePrecision_: 1; //!< Enables double precision support
|
|
uint reportFMAF_: 1; //!< Report FP_FAST_FMAF define in CL program
|
|
uint reportFMA_: 1; //!< Report FP_FAST_FMA define in CL program
|
|
uint use64BitPtr_: 1; //!< Use 64bit pointers on GPU
|
|
uint force32BitOcl20_: 1; //!< Force 32bit apps to take CLANG/HSAIL path on GPU
|
|
uint imageDMA_: 1; //!< Enable direct image DMA transfers
|
|
uint syncObject_: 1; //!< Enable syncobject
|
|
uint ciPlus_: 1; //!< CI and post CI features
|
|
uint viPlus_: 1; //!< VI and post VI features
|
|
uint aiPlus_: 1; //!< AI and post AI features
|
|
uint threadTraceEnable_: 1; //!< Thread trace enable
|
|
uint linearPersistentImage_: 1; //!< Allocates linear images in persistent
|
|
uint useSingleScratch_: 1; //!< Allocates single scratch per device
|
|
uint hsail_: 1; //!< Enables HSAIL compilation
|
|
uint stagingWritePersistent_: 1; //!< Enables persistent writes
|
|
uint svmAtomics_: 1; //!< SVM device atomics
|
|
uint svmFineGrainSystem_: 1; //!< SVM fine grain system support
|
|
uint apuSystem_: 1; //!< Device is APU system with shared memory
|
|
uint hsailDirectSRD_: 1; //!< Controls direct SRD for HSAIL
|
|
uint useDeviceQueue_: 1; //!< Submit to separate device queue
|
|
uint singleFpDenorm_: 1; //!< Support Single FP Denorm
|
|
uint reserved_: 5;
|
|
};
|
|
uint value_;
|
|
};
|
|
|
|
uint oclVersion_; //!< Reported OpenCL version support
|
|
uint debugFlags_; //!< Debug GPU flags
|
|
size_t stagedXferSize_; //!< Staged buffer size
|
|
uint maxRenames_; //!< Maximum number of possible renames
|
|
uint maxRenameSize_; //!< Maximum size for all renames
|
|
uint hwLDSSize_; //!< HW local data store size
|
|
uint maxWorkGroupSize_; //!< Requested workgroup size for this device
|
|
uint hostMemDirectAccess_; //!< Enables direct access to the host memory
|
|
amd::LibrarySelector libSelector_; //!< Select linking libraries for compiler
|
|
uint workloadSplitSize_; //!< Workload split size
|
|
uint minWorkloadTime_; //!< Minimal workload time in 0.1 ms
|
|
uint maxWorkloadTime_; //!< Maximum workload time in 0.1 ms
|
|
uint blitEngine_; //!< Blit engine type
|
|
size_t pinnedXferSize_; //!< Pinned buffer size for transfer
|
|
size_t pinnedMinXferSize_; //!< Minimal buffer size for pinned transfer
|
|
size_t resourceCacheSize_; //!< Resource cache size in MB
|
|
uint64_t maxAllocSize_; //!< Maximum single allocation size
|
|
size_t numMemDependencies_;//!< The array size for memory dependencies tracking
|
|
uint cacheLineSize_; //!< Cache line size in bytes
|
|
uint cacheSize_; //!< L1 cache size in bytes
|
|
size_t xferBufSize_; //!< Transfer buffer size for image copy optimization
|
|
uint numComputeRings_; //!< 0 - disabled, 1 , 2,.. - the number of compute rings
|
|
uint numDeviceEvents_; //!< The number of device events
|
|
uint numWaitEvents_; //!< The number of wait events for device enqueue
|
|
|
|
|
|
//! Default constructor
|
|
Settings();
|
|
|
|
//! Creates settings
|
|
bool create(
|
|
const Pal::DeviceProperties& palProp, //!< PAL device properties
|
|
const Pal::GpuMemoryHeapProperties* heaps, //!< PAL heap settings
|
|
bool reportAsOCL12Device = false //!< Report As OpenCL1.2 Device
|
|
);
|
|
|
|
private:
|
|
//! Disable copy constructor
|
|
Settings(const Settings&);
|
|
|
|
//! Disable assignment
|
|
Settings& operator=(const Settings&);
|
|
|
|
//! Overrides current settings based on registry/environment
|
|
void override();
|
|
};
|
|
|
|
/*@}*/} // namespace pal
|
|
|
|
#endif /*PALSETTINGS_HPP_*/
|