SWDEV-193956 - [hipclang-vdi-rocm][perf]

~45% to 50% of Performance drop on rocBLAS_int8 test

Use the last command in the queue for a wait.
Add extra print information about processed commands.
Add an option to disable file location printing.

Change-Id: I4187883e1a90e571fde3128af98368108fda8785
This commit is contained in:
German Andryeyev
2020-02-20 16:24:10 -05:00
والد fea14a7201
کامیت a66d09f5a3
3فایلهای تغییر یافته به همراه36 افزوده شده و 11 حذف شده
+13 -2
مشاهده پرونده
@@ -85,6 +85,9 @@ uint64_t Event::recordProfilingInfo(int32_t status, uint64_t timeStamp) {
return timeStamp;
}
// Global epoch time since the first processed command
uint64_t epoch = 0;
bool Event::setStatus(int32_t status, uint64_t timeStamp) {
assert(status <= CL_QUEUED && "invalid status");
@@ -96,6 +99,9 @@ bool Event::setStatus(int32_t status, uint64_t timeStamp) {
if (profilingInfo().enabled_) {
timeStamp = recordProfilingInfo(status, timeStamp);
if (epoch == 0) {
epoch = profilingInfo().queued_;
}
}
if (!make_atomic(status_).compareAndSet(currentStatus, status)) {
@@ -112,8 +118,6 @@ bool Event::setStatus(int32_t status, uint64_t timeStamp) {
}
if (status <= CL_COMPLETE) {
ClPrint(LOG_DEBUG, LOG_CMD, "command %p complete", &command());
// Before we notify the waiters that this event reached the CL_COMPLETE
// status, we release all the resources associated with this instance.
releaseResources();
@@ -123,6 +127,13 @@ bool Event::setStatus(int32_t status, uint64_t timeStamp) {
if (referenceCount() > 1) {
signal();
}
ClPrint(LOG_DEBUG, LOG_CMD, "command %p complete (Wall: %ld, CPU: %ld, GPU: %ld us)",
&command(),
((profilingInfo().end_ - epoch) / 1000),
((profilingInfo().submitted_ - profilingInfo().queued_) / 1000),
((profilingInfo().end_ - profilingInfo().start_) / 1000));
release();
}