Correct reported info in ROC profiler

OCL can't distinguish different copy types, but ROC profiler
expects SDMA transfer visibility. Add extra code to detect
a transfer with the host memory and substitute OCL command

Change-Id: I5290acd0e10bc082e00c1d4ae1474a075de7f165
Cette révision appartient à :
German Andryeyev
2020-10-16 14:20:58 -04:00
Parent 17d2e5cf56
révision bd340d8cbf
6 fichiers modifiés avec 47 ajouts et 11 suppressions
+5 -4
Voir le fichier
@@ -115,7 +115,7 @@ class ActivityProf {
if (IsEnabled()) {
uint64_t start = obj.profilingInfo().start_;
uint64_t end = obj.profilingInfo().end_;
callback(start, end, bytes);
callback(obj.type(), start, end, bytes);
}
}
@@ -123,11 +123,12 @@ class ActivityProf {
private:
// Activity callback routine
void callback(const uint64_t begin_ts, const uint64_t end_ts, const size_t bytes) {
activity_op_t op_id = (command_id_ == CL_COMMAND_NDRANGE_KERNEL) ? OP_ID_DISPATCH : OP_ID_COPY;
void callback(const command_id_t command_id,
const uint64_t begin_ts, const uint64_t end_ts, const size_t bytes) {
activity_op_t op_id = (command_id == CL_COMMAND_NDRANGE_KERNEL) ? OP_ID_DISPATCH : OP_ID_COPY;
activity_record_t record {
ACTIVITY_DOMAIN_ID, // domain id
(activity_kind_t)command_id_, // activity kind
(activity_kind_t)command_id, // activity kind
op_id, // operation id
record_id_, // activity correlation id
begin_ts, // begin timestamp, ns
+1 -1
Voir le fichier
@@ -123,7 +123,7 @@ bool Event::setStatus(int32_t status, uint64_t timeStamp) {
// status, we release all the resources associated with this instance.
releaseResources();
activity_.ReportEventTimestamps(*this);
activity_.ReportEventTimestamps(command());
// Broadcast all the waiters.
if (referenceCount() > 1) {
signal();
+4 -2
Voir le fichier
@@ -213,8 +213,8 @@ class Command : public Event {
//! Next GPU command in the queue list
Command* next_;
const cl_command_type type_; //!< This command's OpenCL type.
volatile int32_t exception_; //!< The first raised exception.
cl_command_type type_; //!< This command's OpenCL type.
volatile int32_t exception_; //!< The first raised exception.
void* data_;
protected:
@@ -298,6 +298,8 @@ class Command : public Event {
//! Get command wait bits
uint32_t getWaitBits() const { return commandWaitBits_; }
void OverrrideCommandType(cl_command_type type) { type_ = type; }
};
class UserEvent : public Command {