Skip to content

Commit b1f975d

Browse files
authored
changed field _bytes_copied to _bytes; made testcase more specific in check (#5)
1 parent b5cd71f commit b1f975d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

sdk/include/pti_view.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ typedef struct pti_view_record_memory_copy {
184184
uint64_t _end_timestamp; //!< Timestamp of memory copy completion on device, ns
185185
uint64_t _submit_timestamp; //!< Timestamp of memory copy command list submission
186186
//!< to device, ns
187-
uint64_t _bytes_copied; //!< number of bytes copied
187+
uint64_t _bytes; //!< number of bytes copied
188188
} pti_view_record_memory_copy;
189189

190190
/**

sdk/src/view_handler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ inline void MemCopyEvent(void* /*data*/, const ZeKernelCommandExecutionRecord& r
640640
record._queue_handle = rec.queue_;
641641
record._device_handle = rec.device_;
642642
record._context_handle = rec.context_;
643-
record._bytes_copied = rec.bytes_xfered_;
643+
record._bytes = rec.bytes_xfered_;
644644

645645
GetDeviceId(record._pci_address, rec);
646646
SetMemCopyType(record, rec);

sdk/test/main_dpcgemm_fixture.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ class MainFixtureTest : public ::testing::Test {
255255
break;
256256
}
257257
case pti_view_kind::PTI_VIEW_DEVICE_GPU_MEM_COPY: {
258-
memory_bytes_copied = reinterpret_cast<pti_view_record_memory_copy*>(ptr)->_bytes_copied;
258+
memory_bytes_copied = reinterpret_cast<pti_view_record_memory_copy*>(ptr)->_bytes;
259259
memory_view_record_created = true;
260260
memory_view_record_count += 1;
261261
break;
@@ -413,7 +413,7 @@ TEST_F(MainFixtureTest, MemoryViewRecordCreated) {
413413
EXPECT_EQ(ptiViewSetCallbacks(BufferRequested, BufferCompleted), pti_result::PTI_SUCCESS);
414414
RunGemm();
415415
EXPECT_EQ(memory_view_record_created, true);
416-
EXPECT_GT(memory_bytes_copied, 0);
416+
EXPECT_EQ(memory_bytes_copied, 4194304);
417417
}
418418

419419
TEST_F(MainFixtureTest, KernelViewRecordCreated) {

0 commit comments

Comments
 (0)