bc5a50bf7b
ECR #304775 - Remove EG/NI support - Remove the heap emulation (non-vm) Affected files ... ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_memobj.cpp#77 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_svm.cpp#12 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpusettings.cpp#31 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#186 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#253 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpublit.cpp#118 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#523 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#148 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuheap.cpp#28 delete ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuheap.hpp#16 delete ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#297 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.hpp#116 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.cpp#122 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.hpp#48 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#227 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.hpp#83 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#329 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.hpp#94 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#379 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#143 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.h#57 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsasettings.cpp#38 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsasettings.cpp#9 edit ... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#242 edit
81 lines
2.0 KiB
C++
81 lines
2.0 KiB
C++
//
|
|
// Copyright (c) 2010 Advanced Micro Devices, Inc. All rights reserved.
|
|
//
|
|
|
|
#ifndef WITHOUT_GPU_BACKEND
|
|
|
|
#include "top.hpp"
|
|
#include "os/os.hpp"
|
|
#include "device/device.hpp"
|
|
#include "hsasettings.hpp"
|
|
|
|
namespace oclhsa {
|
|
|
|
Settings::Settings()
|
|
{
|
|
// Initialize the HSA device default settings
|
|
|
|
// Set this to true when we drop the flag
|
|
doublePrecision_ = ::CL_KHR_FP64;
|
|
pollCompletion_ = ENVVAR_HSA_POLL_KERNEL_COMPLETION;
|
|
|
|
// Enable "local" memory in HSA
|
|
enableLocalMemory_ = HSA_LOCAL_MEMORY_ENABLE;
|
|
enableSvm32BitsAtomics_ = HSA_ENABLE_ATOMICS_32B;
|
|
|
|
maxWorkGroupSize_ = 256;
|
|
maxWorkGroupSize2DX_ = 16;
|
|
maxWorkGroupSize2DY_ = 16;
|
|
maxWorkGroupSize3DX_ = 4;
|
|
maxWorkGroupSize3DY_ = 4;
|
|
maxWorkGroupSize3DZ_ = 4;
|
|
}
|
|
|
|
bool
|
|
Settings::create(bool doublePrecision)
|
|
{
|
|
customHostAllocator_ = true;
|
|
|
|
// Enable extensions
|
|
enableExtension(ClKhrByteAddressableStore);
|
|
enableExtension(ClKhrGlobalInt32BaseAtomics);
|
|
enableExtension(ClKhrGlobalInt32ExtendedAtomics);
|
|
enableExtension(ClKhrLocalInt32BaseAtomics);
|
|
enableExtension(ClKhrLocalInt32ExtendedAtomics);
|
|
enableExtension(ClExtAtomicCounters32);
|
|
//enableExtension(ClKhr3DImageWrites);
|
|
enableExtension(ClKhrGlSharing);
|
|
enableExtension(ClAmdMediaOps);
|
|
enableExtension(ClAmdMediaOps2);
|
|
#if defined(_WIN32)
|
|
enableExtension(ClKhrD3d10Sharing);
|
|
enableExtension(ClKhrD3d11Sharing);
|
|
#endif // _WIN32
|
|
//enableExtension(ClKhrImage2dFromBuffer);
|
|
//enableExtension(ClAmdImage2dFromBufferReadOnly);
|
|
// Make sure device supports doubles
|
|
doublePrecision_ &= doublePrecision;
|
|
|
|
if (doublePrecision_) {
|
|
// Enable KHR double precision extension
|
|
enableExtension(ClKhrFp64);
|
|
// Also enable AMD double precision extension?
|
|
enableExtension(ClAmdFp64);
|
|
}
|
|
enableExtension(ClKhrIlProgram);
|
|
|
|
// Override current device settings
|
|
override();
|
|
|
|
return true;
|
|
}
|
|
|
|
void
|
|
Settings::override()
|
|
{
|
|
}
|
|
|
|
} // namespace oclhsa
|
|
|
|
#endif // WITHOUT_GPU_BACKEND
|