From 1bd265f8d6f4dc00ef5d29d28bba2c2989dff589 Mon Sep 17 00:00:00 2001 From: Aryan Salmanpour Date: Wed, 17 Jun 2020 16:24:32 -0400 Subject: [PATCH] move hostcall-based implementation of messages/printf from rocm backend to the common device layer SWDEV-232428 Change-Id: I14b774e66a1783569c6d34d8759c1faa5f340e27 --- rocclr/CMakeLists.txt | 2 ++ rocclr/device/{rocm/rochcmessages.cpp => devhcmessages.cpp} | 4 ++-- rocclr/device/{rocm/rochcmessages.hpp => devhcmessages.hpp} | 0 rocclr/device/{rocm/rochcprintf.cpp => devhcprintf.cpp} | 0 rocclr/device/rocm/CMakeLists.txt | 2 -- rocclr/device/rocm/rochostcall.cpp | 2 +- 6 files changed, 5 insertions(+), 5 deletions(-) rename rocclr/device/{rocm/rochcmessages.cpp => devhcmessages.cpp} (98%) rename rocclr/device/{rocm/rochcmessages.hpp => devhcmessages.hpp} (100%) rename rocclr/device/{rocm/rochcprintf.cpp => devhcprintf.cpp} (100%) diff --git a/rocclr/CMakeLists.txt b/rocclr/CMakeLists.txt index 274d0c2bc7..455a3bfd98 100644 --- a/rocclr/CMakeLists.txt +++ b/rocclr/CMakeLists.txt @@ -139,6 +139,8 @@ set(oclruntime_src device/devkernel.cpp device/devwavelimiter.cpp device/devprogram.cpp + device/devhcprintf.cpp + device/devhcmessages.cpp platform/activity.cpp platform/kernel.cpp platform/context.cpp diff --git a/rocclr/device/rocm/rochcmessages.cpp b/rocclr/device/devhcmessages.cpp similarity index 98% rename from rocclr/device/rocm/rochcmessages.cpp rename to rocclr/device/devhcmessages.cpp index c65f0bb8b8..7b57c0a2f5 100644 --- a/rocclr/device/rocm/rochcmessages.cpp +++ b/rocclr/device/devhcmessages.cpp @@ -22,7 +22,7 @@ #include "top.hpp" #include "utils/flags.hpp" -#include "rochcmessages.hpp" +#include "devhcmessages.hpp" #include @@ -132,7 +132,7 @@ void MessageHandler::discardMessage(Message* message) { // some busy-ness heuristic. } -// Defined in rochcprintf.cpp +// Defined in devhcprintf.cpp void handlePrintf(uint64_t* output, const uint64_t* input, uint64_t len); bool MessageHandler::handlePayload(uint32_t service, uint64_t* payload) { diff --git a/rocclr/device/rocm/rochcmessages.hpp b/rocclr/device/devhcmessages.hpp similarity index 100% rename from rocclr/device/rocm/rochcmessages.hpp rename to rocclr/device/devhcmessages.hpp diff --git a/rocclr/device/rocm/rochcprintf.cpp b/rocclr/device/devhcprintf.cpp similarity index 100% rename from rocclr/device/rocm/rochcprintf.cpp rename to rocclr/device/devhcprintf.cpp diff --git a/rocclr/device/rocm/CMakeLists.txt b/rocclr/device/rocm/CMakeLists.txt index 3c3301b0f8..35683571e5 100644 --- a/rocclr/device/rocm/CMakeLists.txt +++ b/rocclr/device/rocm/CMakeLists.txt @@ -11,8 +11,6 @@ add_library(oclrocm OBJECT rocappprofile.cpp rocsettings.cpp rocschedcl.cpp - rochcmessages.cpp - rochcprintf.cpp rochostcall.cpp ) diff --git a/rocclr/device/rocm/rochostcall.cpp b/rocclr/device/rocm/rochostcall.cpp index c8a6493fcb..810a466208 100644 --- a/rocclr/device/rocm/rochostcall.cpp +++ b/rocclr/device/rocm/rochostcall.cpp @@ -23,7 +23,7 @@ #include "utils/flags.hpp" #include "rochostcall.hpp" -#include "rochcmessages.hpp" +#include "device/devhcmessages.hpp" #include "os/os.hpp" #include "thread/monitor.hpp"