9cd2db67f6
SWDEV-79445 - OCL generic changes and code clean-up - Optimize setup of kernel arguments. - Add HW ABI support in the abstraction layer - Remove arguments parsing loop from the kernel launch. Memory processing will be responsible for dependency tracking and patching of arguments. ReviewBoardURL = http://ocltc.amd.com/reviews/r/15400/ Tests: 1. ./run_conformance.py ./opencl_conformance_tests_reallyquick.csv CL_DEVICE_TYPE_GPU for openCL 1.2: OpenCL-GL sharing failed. This is not a regression. 2. ./ocltst -m oclruntime.so -A oclruntime.exclude 3. ./run_conformance.py opencl_conformance_tests_lightning.csv CL_DEVICE_TYPE_GPU : PASS 4. teamcity test: http://ocltc.amd.com:8111/viewModification.html?modId=104598&personal=true&buildTypeId=&tab=vcsModificationBuilds&show_all_builds=true Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#39 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.hpp#23 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocsettings.cpp#34 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocsettings.hpp#14 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#60 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.hpp#17 edit
82 linhas
2.3 KiB
C++
82 linhas
2.3 KiB
C++
//
|
|
// Copyright (c) 2010 Advanced Micro Devices, Inc. All rights reserved.
|
|
//
|
|
#pragma once
|
|
|
|
#ifndef WITHOUT_HSA_BACKEND
|
|
|
|
#include "library.hpp"
|
|
|
|
/*! \addtogroup HSA OCL Stub Implementation
|
|
* @{
|
|
*/
|
|
|
|
//! HSA OCL STUB Implementation
|
|
namespace roc {
|
|
|
|
//! Device settings
|
|
class Settings : public device::Settings {
|
|
public:
|
|
union {
|
|
struct {
|
|
uint doublePrecision_ : 1; //!< Enables double precision support
|
|
uint pollCompletion_ : 1; //!< Enables polling in HSA
|
|
uint enableLocalMemory_ : 1; //!< Enable GPUVM memory
|
|
uint enableNCMode_ : 1; //!< Enable Non Coherent mode for system memory
|
|
uint enablePartialDispatch_ : 1; //!< Enable support for Partial Dispatch
|
|
uint imageDMA_ : 1; //!< Enable direct image DMA transfers
|
|
uint stagedXferRead_ : 1; //!< Uses a staged buffer read
|
|
uint stagedXferWrite_ : 1; //!< Uses a staged buffer write
|
|
uint singleFpDenorm_ : 1; //!< Support Single FP Denorm
|
|
uint apuSystem_ : 1; //!< APU system
|
|
uint reserved_ : 20;
|
|
};
|
|
uint value_;
|
|
};
|
|
|
|
//! Default max workgroup size for 1D
|
|
int maxWorkGroupSize_;
|
|
|
|
//! Preferred workgroup size
|
|
uint preferredWorkGroupSize_;
|
|
|
|
//! Default max workgroup sizes for 2D
|
|
int maxWorkGroupSize2DX_;
|
|
int maxWorkGroupSize2DY_;
|
|
|
|
//! Default max workgroup sizes for 3D
|
|
int maxWorkGroupSize3DX_;
|
|
int maxWorkGroupSize3DY_;
|
|
int maxWorkGroupSize3DZ_;
|
|
|
|
uint kernargPoolSize_;
|
|
uint signalPoolSize_;
|
|
uint numDeviceEvents_; //!< The number of device events
|
|
uint numWaitEvents_; //!< The number of wait events for device enqueue
|
|
|
|
size_t xferBufSize_; //!< Transfer buffer size for image copy optimization
|
|
size_t stagedXferSize_; //!< Staged buffer size
|
|
size_t pinnedXferSize_; //!< Pinned buffer size for transfer
|
|
size_t pinnedMinXferSize_; //!< Minimal buffer size for pinned transfer
|
|
|
|
//! Default constructor
|
|
Settings();
|
|
|
|
//! Creates settings
|
|
bool create(bool fullProfile, int gfxipVersion);
|
|
|
|
private:
|
|
//! Disable copy constructor
|
|
Settings(const Settings&);
|
|
|
|
//! Disable assignment
|
|
Settings& operator=(const Settings&);
|
|
|
|
//! Overrides current settings based on registry/environment
|
|
void override();
|
|
};
|
|
|
|
/*@}*/} // namespace roc
|
|
|
|
#endif /*WITHOUT_HSA_BACKEND*/
|