Add support for gfx900
- Route AQL doorbell directly to HW doorbell - Reuse precompiled Gfx8 shaders on Gfx9 (ISA is compatible) - Add a warning for unimplemented code cache invalidation Change-Id: I92096584a1404e35779c96ae6bdc3e0e7fd04721
This commit is contained in:
@@ -370,6 +370,12 @@ uint64_t AqlQueue::AddWriteIndexRelease(uint64_t value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AqlQueue::StoreRelaxed(hsa_signal_value_t value) {
|
void AqlQueue::StoreRelaxed(hsa_signal_value_t value) {
|
||||||
|
if (doorbell_type_ == 2) {
|
||||||
|
// Hardware doorbell supports AQL semantics.
|
||||||
|
atomic::Store(signal_.hardware_doorbell_ptr, uint64_t(value), std::memory_order_release);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Acquire spinlock protecting the legacy doorbell.
|
// Acquire spinlock protecting the legacy doorbell.
|
||||||
while (atomic::Cas(&amd_queue_.legacy_doorbell_lock, 1U, 0U,
|
while (atomic::Cas(&amd_queue_.legacy_doorbell_lock, 1U, 0U,
|
||||||
std::memory_order_acquire) != 0) {
|
std::memory_order_acquire) != 0) {
|
||||||
|
|||||||
@@ -201,6 +201,7 @@ void GpuAgent::AssembleShader(const char* src_sp3, const char* func_name,
|
|||||||
asic_shader = &compiled_shader_it->second.compute_7;
|
asic_shader = &compiled_shader_it->second.compute_7;
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
|
case 9: // ISA-compatible with 8
|
||||||
asic_shader = &compiled_shader_it->second.compute_8;
|
asic_shader = &compiled_shader_it->second.compute_8;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -1176,6 +1177,12 @@ void GpuAgent::InvalidateCodeCaches() {
|
|||||||
// Microcode is handling code cache invalidation.
|
// Microcode is handling code cache invalidation.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} else if (isa_->GetMajorVersion() == 9) {
|
||||||
|
static std::once_flag once;
|
||||||
|
std::call_once(once, []() {
|
||||||
|
fprintf(stderr, "warning: code cache invalidation not implemented\n");
|
||||||
|
});
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
assert(false && "Code cache invalidation not implemented for this agent");
|
assert(false && "Code cache invalidation not implemented for this agent");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user