SWDEV-556684 - Remove HSAIL support (#1183)

This commit is contained in:
Pengda Xie
2025-10-23 11:21:49 -07:00
committed by GitHub
parent db949445c3
commit a4bbd73dc6
53 changed files with 410 additions and 5066 deletions
+5 -48
View File
@@ -29,9 +29,6 @@
//! \namespace amd::roc HSA Device Implementation
namespace amd::roc {
class HSAILProgram;
class LightningProgram;
//! \class empty program
class Program : public device::Program {
friend class ClBinary;
@@ -62,15 +59,6 @@ class Program : public device::Program {
virtual bool createGlobalVarObj(amd::Memory** amd_mem_obj, void** device_pptr, size_t* bytes,
const char* global_name) const;
protected:
/*! \brief Compiles LLVM binary to HSAIL code (compiler backend: link+opt+codegen)
*
* \return The build error code
*/
int compileBinaryToHSAIL(amd::option::Options* options //!< options for compilation
);
virtual bool createBinary(amd::option::Options* options) = 0;
protected:
//! Disable default copy constructor
Program(const Program&) = delete;
@@ -79,48 +67,17 @@ class Program : public device::Program {
virtual bool defineGlobalVar(const char* name, void* dptr);
protected:
/* HSA executable */
hsa_executable_t hsaExecutable_; //!< Handle to HSA executable
hsa_code_object_reader_t hsaCodeObjectReader_; //!< Handle to HSA code reader
};
class HSAILProgram : public roc::Program {
public:
HSAILProgram(roc::NullDevice& device, amd::Program& owner);
virtual ~HSAILProgram();
protected:
bool createBinary(amd::option::Options* options) override { return true; }
virtual bool setKernels(void* binary, size_t binSize,
amd::Os::FileDesc fdesc = amd::Os::FDescInit(), size_t foffset = 0,
std::string uri = std::string()) override;
private:
std::string codegenOptions(amd::option::Options* options);
bool saveBinaryAndSetType(type_t type) override;
};
class LightningProgram final : public roc::Program {
public:
LightningProgram(roc::NullDevice& device, amd::Program& owner);
virtual ~LightningProgram() {}
protected:
bool createBinary(amd::option::Options* options) final;
bool saveBinaryAndSetType(type_t type) final { return true; }
private:
bool saveBinaryAndSetType(type_t type, void* rawBinary, size_t size);
bool createBinary(amd::option::Options* options) override final;
bool createKernels(void* binary, size_t binSize, bool useUniformWorkGroupSize,
bool internalKernel) override final;
bool setKernels(void* binary, size_t binSize, amd::Os::FileDesc fdesc = amd::Os::FDescInit(),
size_t foffset = 0, std::string uri = std::string()) override final;
protected:
/* HSA executable */
hsa_executable_t hsaExecutable_; //!< Handle to HSA executable
hsa_code_object_reader_t hsaCodeObjectReader_; //!< Handle to HSA code reader
};
/*@}*/ // namespace amd::roc