P4 to Git Change 1981324 by kjayapra@3_HIPWS_TXT_ROCM on 2019/08/11 18:44:40

SWDEV-188177 - Texture API implementation and support for extern variables.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_hcc.def.in#18 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_hcc.map.in#20 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_internal.hpp#35 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#32 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_platform.cpp#37 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_texture.cpp#14 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#340 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.cpp#57 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.hpp#31 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#608 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#172 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#250 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.hpp#79 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#152 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.hpp#41 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#96 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.hpp#39 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#133 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.hpp#39 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#105 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.hpp#48 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#102 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.hpp#46 edit


[ROCm/clr commit: 0c83114de0]
Этот коммит содержится в:
foreman
2019-08-11 18:53:11 -04:00
родитель 9c5aa778d7
Коммит 1c653a1aa7
17 изменённых файлов: 246 добавлений и 77 удалений
+24 -2
Просмотреть файл
@@ -62,6 +62,11 @@ namespace device {
class ClBinary;
class Kernel;
struct SymbolInfo {
size_t sym_type;
std::vector<std::string>* var_names;
};
//! A program object for a specific device.
class Program : public amd::HeapObject {
public:
@@ -79,6 +84,7 @@ class Program : public amd::HeapObject {
private:
//! The device target for this binary.
amd::SharedReference<amd::Device> device_;
amd::Program& owner_; //!< owner of this program
kernels_t kernels_; //!< The kernel entry points this binary.
type_t type_; //!< type of this program
@@ -125,9 +131,11 @@ class Program : public amd::HeapObject {
CodeObjectMD* metadata_; //!< Runtime metadata
#endif
std::vector<amd::Memory*> undef_mem_obj_;
public:
//! Construct a section.
Program(amd::Device& device);
Program(amd::Device& device, amd::Program& owner);
//! Destroy this binary image.
virtual ~Program();
@@ -135,6 +143,8 @@ class Program : public amd::HeapObject {
//! Destroy all the kernels
void clear();
amd::Program* owner() const { return &owner_; }
//! Return the compiler options passed to build this program
amd::option::Options* getCompilerOptions() const { return programOptions_; }
@@ -228,7 +238,8 @@ class Program : public amd::HeapObject {
//! Check if SRAM ECC is enable
const bool sramEccEnable() const { return (sramEccEnabled_ == 1); }
virtual bool getGlobalSymbolsFromCodeObj(std::vector<std::string>* var_names) const;
bool getGlobalVarFromCodeObj(std::vector<std::string>* var_names) const;
bool getUndefinedVarFromCodeObj(std::vector<std::string>* var_names) const;
virtual bool createGlobalVarObj(amd::Memory** amd_mem_obj, void** dptr,
size_t* bytes, const char* globalName) const {
@@ -316,6 +327,17 @@ class Program : public amd::HeapObject {
bool isElf(const char* bin) const { return amd::isElfMagic(bin); }
virtual bool defineGlobalVar(const char* name, void* dptr) {
ShouldNotReachHere();
return false;
}
#if defined(USE_COMGR_LIBRARY)
bool getSymbolsFromCodeObj(std::vector<std::string>* var_names, amd_comgr_symbol_type_t sym_type) const;
#endif
bool getUndefinedVarInfo(std::string var_name, void** var_addr, size_t* var_size);
bool defineUndefinedVars();
private:
//! Compile the device program with LC path
bool compileImplLC(const std::string& sourceCode,