From 87e6a3fa02c429bae4c52702d55cbfc385babbd8 Mon Sep 17 00:00:00 2001
From: foreman
Date: Fri, 29 Aug 2014 16:48:31 -0400
Subject: [PATCH] P4 to Git Change 1071782 by gandryey@gera-dev-w7 on
2014/08/29 16:43:04
ECR #304775 - Combine BUSY and DONE processing in the scheduler
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuschedcl.cpp#27 edit
---
rocclr/runtime/device/gpu/gpuschedcl.cpp | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/rocclr/runtime/device/gpu/gpuschedcl.cpp b/rocclr/runtime/device/gpu/gpuschedcl.cpp
index 3871935c1d..221b52bc49 100644
--- a/rocclr/runtime/device/gpu/gpuschedcl.cpp
+++ b/rocclr/runtime/device/gpu/gpuschedcl.cpp
@@ -166,7 +166,6 @@ const uint ResumeExecution = 0x80000000; // 0x81000000
const uint StallExecution = 0x00000000; // 0x01000000
const uint WavefrontSize = 64;
const uint MaxWaveSize = 0x400;
-const uint CL_DONE = 0xffff;
static inline void
dispatch(
@@ -465,15 +464,17 @@ scheduler(
(__global AmdEvent*)queue->event_slots);
}
}
- else if (slotState == AQL_WRAP_DONE) {
- // Was CL_EVENT requested?
- if (event != 0) {
- // If state isn't DONE yet
- if (event->state != CL_DONE) {
+ else if ((slotState == AQL_WRAP_BUSY) ||
+ (slotState == AQL_WRAP_DONE)) {
+ if (slotState == AQL_WRAP_BUSY) {
+ disp->state = AQL_WRAP_DONE;
+ if (event != 0) {
event->timer[PROFILING_COMMAND_END] =
(__hsail_get_clock() * (ulong)param->eng_clk) >> 10;
- event->state = CL_DONE;
}
+ }
+ // Was CL_EVENT requested?
+ if (event != 0) {
// The current dispatch doesn't have any outstanding children
if (disp->child_counter == 0) {
event->timer[PROFILING_COMMAND_COMPLETE] =
@@ -500,9 +501,6 @@ scheduler(
release_slot(amask, idx);
}
}
- else if (slotState == AQL_WRAP_BUSY) {
- disp->state = AQL_WRAP_DONE;
- }
}
barrier(CLK_GLOBAL_MEM_FENCE);