428dfba879
SWDEV-92067 - Support app profiles on Brahma. The Brahma kernel driver does not support parsing the app profile blob files, and does not have ADL. OGL has a library that reads and parses the blob file directly. This CL imports the OGL library into OCL runtime. Affected files ... ... //depot/stg/opencl/drivers/opencl/appprofiles/brahma/apl.cpp#1 add ... //depot/stg/opencl/drivers/opencl/appprofiles/brahma/apl.hpp#1 add ... //depot/stg/opencl/drivers/opencl/appprofiles/brahma/aplexport.cpp#1 add ... //depot/stg/opencl/drivers/opencl/appprofiles/brahma/structanddefines.hpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/build/Makefile.runtime#63 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/appprofile.cpp#12 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/appprofile.hpp#9 edit
55 wiersze
1.4 KiB
C++
55 wiersze
1.4 KiB
C++
//
|
|
// Copyright (c) 2014 Advanced Micro Devices, Inc. All rights reserved.
|
|
//
|
|
#ifndef APPPROFILE_HPP_
|
|
#define APPPROFILE_HPP_
|
|
|
|
#include <map>
|
|
#include <string>
|
|
|
|
namespace amd {
|
|
|
|
class AppProfile {
|
|
public:
|
|
AppProfile();
|
|
virtual ~AppProfile();
|
|
|
|
bool init();
|
|
|
|
cl_device_type ApplyHsaDeviceHintFlag(const cl_device_type& type);
|
|
bool IsHsaInitDisabled() { return noHsaInit_; }
|
|
const std::string& GetBuildOptsAppend() const { return buildOptsAppend_; }
|
|
protected:
|
|
enum DataTypes
|
|
{
|
|
DataType_Unknown = 0,
|
|
DataType_Boolean,
|
|
DataType_String,
|
|
};
|
|
|
|
struct PropertyData {
|
|
PropertyData(DataTypes type, void* data): type_(type), data_(data) {}
|
|
DataTypes type_; //!< Data type
|
|
void* data_; //!< Pointer to the data
|
|
};
|
|
|
|
typedef std::map<std::string, PropertyData> DataMap;
|
|
|
|
DataMap propertyDataMap_;
|
|
std::string appFileName_; // without extension
|
|
std::wstring wsAppFileName_;
|
|
|
|
virtual bool ParseApplicationProfile();
|
|
|
|
cl_device_type hsaDeviceHint_; // valid values: CL_HSA_ENABLED_AMD
|
|
// or CL_HSA_DISABLED_AMD
|
|
bool gpuvmHighAddr_; // Currently not used.
|
|
bool noHsaInit_; // Do not even initialize HSA.
|
|
bool profileOverridesAllSettings_; // Overrides hint flags and env.var.
|
|
std::string buildOptsAppend_;
|
|
};
|
|
|
|
}
|
|
#endif
|
|
|