rocr: Remove support for Kaveri GPUs

Kaveri GPUs are EoL


[ROCm/ROCR-Runtime commit: 24ce840732]
Этот коммит содержится в:
David Yat Sin
2025-05-28 21:13:11 +00:00
коммит произвёл Yat Sin, David
родитель 8982f2c2c6
Коммит 37afa1c0eb
5 изменённых файлов: 7 добавлений и 60 удалений
+1 -4
Просмотреть файл
@@ -65,7 +65,7 @@ class AqlQueue : public core::Queue, private core::LocalSignal, public core::Doo
// Acquires/releases queue resources and requests HW schedule/deschedule.
AqlQueue(core::SharedQueue* shared_queue, GpuAgent* agent, size_t req_size_pkts,
HSAuint32 node_id, ScratchInfo& scratch, core::HsaEventCallback callback, void* err_data,
uint64_t flags, bool is_kv = false);
uint64_t flags);
~AqlQueue();
@@ -303,9 +303,6 @@ class AqlQueue : public core::Queue, private core::LocalSignal, public core::Doo
void* errors_data_;
// Is KV device queue
bool is_kv_queue_;
// GPU-visible indirect buffer holding PM4 commands.
void* pm4_ib_buf_;
uint32_t pm4_ib_size_b_;
-10
Просмотреть файл
@@ -173,11 +173,6 @@ class GpuAgentInt : public core::Agent {
virtual void SetRecSdmaEngOverride(bool flag) = 0;
// @brief Query if agent represent Kaveri GPU.
//
// @retval true if agent is Kaveri GPU.
virtual bool is_kv_device() const = 0;
// @brief Query the agent HSA profile.
//
// @retval HSA profile.
@@ -402,9 +397,6 @@ class GpuAgent : public GpuAgentInt {
const std::vector<const core::Isa *>& supported_isas() const override {
return supported_isas_;}
// @brief Override from AMD::GpuAgentInt.
__forceinline bool is_kv_device() const override { return is_kv_device_; }
// @brief Override from AMD::GpuAgentInt.
__forceinline hsa_profile_t profile() const override { return profile_; }
@@ -649,8 +641,6 @@ class GpuAgent : public GpuAgentInt {
// @brief HSA profile.
hsa_profile_t profile_;
bool is_kv_device_;
void* trap_code_buf_;
size_t trap_code_buf_size_;
+1 -2
Просмотреть файл
@@ -77,7 +77,7 @@ namespace AMD {
AqlQueue::AqlQueue(core::SharedQueue* shared_queue, GpuAgent* agent, size_t req_size_pkts,
HSAuint32 node_id, ScratchInfo& scratch, core::HsaEventCallback callback,
void* err_data, uint64_t flags, bool is_kv)
void* err_data, uint64_t flags)
: Queue(shared_queue, flags, !agent->is_xgmi_cpu_gpu()),
LocalSignal(0, false),
DoorbellSignal(signal()),
@@ -89,7 +89,6 @@ AqlQueue::AqlQueue(core::SharedQueue* shared_queue, GpuAgent* agent, size_t req_
queue_scratch_(scratch),
errors_callback_(callback),
errors_data_(err_data),
is_kv_queue_(is_kv),
pm4_ib_buf_(nullptr),
pm4_ib_size_b_(0x1000),
dynamicScratchState(0),
+2 -39
Просмотреть файл
@@ -99,7 +99,6 @@ GpuAgent::GpuAgent(HSAuint32 node, const HsaNodeProperties& node_props, bool xna
current_coherency_type_(HSA_AMD_COHERENCY_TYPE_COHERENT),
scratch_used_large_(0),
queues_(),
is_kv_device_(false),
trap_code_buf_(NULL),
trap_code_buf_size_(0),
doorbell_queue_map_(NULL),
@@ -190,12 +189,6 @@ GpuAgent::GpuAgent(HSAuint32 node, const HsaNodeProperties& node_props, bool xna
supported_isas_.push_back(core::IsaRegistry::GetIsa(isa_->GetIsaGeneric()));
}
// Check if the device is Kaveri, only on GPU device.
if (isa_->GetMajorVersion() == 7 && isa_->GetMinorVersion() == 0 &&
isa_->GetStepping() == 0) {
is_kv_device_ = true;
}
current_coherency_type((profile_ == HSA_PROFILE_FULL)
? HSA_AMD_COHERENCY_TYPE_COHERENT
: HSA_AMD_COHERENCY_TYPE_NONCOHERENT);
@@ -1779,7 +1772,7 @@ hsa_status_t GpuAgent::QueueCreate(size_t size, hsa_queue_type32_t queue_type, u
if (!shared_queue) return HSA_STATUS_ERROR_OUT_OF_RESOURCES;
auto aql_queue = new AqlQueue(shared_queue, this, size, node_id(), scratch, event_callback, data,
flags, is_kv_device_);
flags);
*queue = aql_queue;
aql_queues_.push_back(aql_queue);
@@ -2178,38 +2171,8 @@ uint64_t GpuAgent::TranslateTime(uint64_t tick) {
return system_tick;
}
/* This function is deprecated */
bool GpuAgent::current_coherency_type(hsa_amd_coherency_type_t type) {
if (!is_kv_device_) {
current_coherency_type_ = type;
return true;
}
ScopedAcquire<KernelMutex> Lock(&coherency_lock_);
if (ape1_base_ == 0 && ape1_size_ == 0) {
static const size_t kApe1Alignment = 64 * 1024;
ape1_size_ = kApe1Alignment;
ape1_base_ = reinterpret_cast<uintptr_t>(
_aligned_malloc(ape1_size_, kApe1Alignment));
assert((ape1_base_ != 0) && ("APE1 allocation failed"));
} else if (type == current_coherency_type_) {
return true;
}
HSA_CACHING_TYPE type0, type1;
if (type == HSA_AMD_COHERENCY_TYPE_COHERENT) {
type0 = HSA_CACHING_CACHED;
type1 = HSA_CACHING_NONCACHED;
} else {
type0 = HSA_CACHING_NONCACHED;
type1 = HSA_CACHING_CACHED;
}
if (HSAKMT_CALL(hsaKmtSetMemoryPolicy(node_id(), type0, type1,
reinterpret_cast<void*>(ape1_base_),
ape1_size_)) != HSAKMT_STATUS_SUCCESS) {
return false;
}
current_coherency_type_ = type;
return true;
}
+3 -5
Просмотреть файл
@@ -156,7 +156,7 @@ bool MallocedMemory::Freeze()
class MappedMemory final: public SegmentMemory {
public:
MappedMemory(bool is_kv = false): SegmentMemory(), is_kv_(is_kv), ptr_(nullptr), size_(0) {}
MappedMemory(): SegmentMemory(), ptr_(nullptr), size_(0) {}
~MappedMemory() {}
void* Address(size_t offset = 0) const override
@@ -175,7 +175,6 @@ private:
MappedMemory(const MappedMemory&);
MappedMemory& operator=(const MappedMemory&);
bool is_kv_;
void *ptr_;
size_t size_;
};
@@ -188,8 +187,7 @@ bool MappedMemory::Allocate(size_t size, size_t align, bool zero)
#if defined(_WIN32) || defined(_WIN64)
ptr_ = (void*)VirtualAlloc(nullptr, size, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
#else
ptr_ = is_kv_ ?
mmap(nullptr, size, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0) :
ptr_ =
mmap(nullptr, size, PROT_EXEC | PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE, -1, 0);
#endif // _WIN32 || _WIN64
if (nullptr == ptr_) {
@@ -468,7 +466,7 @@ void* LoaderContext::SegmentAlloc(amdgpu_hsa_elf_segment_t segment,
mem = new (std::nothrow) RegionMemory(RegionMemory::AgentLocal(agent, true), true);
break;
case HSA_PROFILE_FULL:
mem = new (std::nothrow) MappedMemory(((AMD::GpuAgentInt*)core::Agent::Convert(agent))->is_kv_device());
mem = new (std::nothrow) MappedMemory();
break;
default:
assert(false);