Skip to content

Commit

Permalink
clog for copy via host when verbose>=1, and debug
Browse files Browse the repository at this point in the history
Co-authored-by: Terry Cojean <terry.cojean@kit.edu>
  • Loading branch information
yhmtsai and tcojean committed Jul 15, 2021
1 parent a2040dd commit 883dd5c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,7 @@ build/dpcpp/cpu/release/static:
BUILD_SHARED_LIBS: "ON"
SYCL_DEVICE_TYPE: "CPU"

# It gives two available backends of GPU on tests
build/dpcpp/igpu/release/shared:
<<: *default_build_with_test
extends:
Expand Down Expand Up @@ -768,6 +769,7 @@ build/dpcpp/level_zero_igpu/debug/static:
DPCPP_SINGLE_MODE: "ON"
SYCL_DEVICE_FILTER: "Level_Zero:GPU"

# It gives two available backends of GPU on tests
build/dpcpp/dgpu/release/static:
<<: *default_build_with_test
extends:
Expand Down
6 changes: 6 additions & 0 deletions include/ginkgo/core/base/executor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


#include <array>
#include <iostream>
#include <memory>
#include <mutex>
#include <sstream>
Expand Down Expand Up @@ -621,7 +622,12 @@ class Executor : public log::EnableLogging<Executor> {
this->raw_copy_from(src_exec, num_elems * sizeof(T), src_ptr,
dest_ptr);
} catch (NotSupported &) {
#if (GKO_VERBOSE_LEVEL >= 1) && !defined(NDEBUG)
// Unoptimized copy. Try to go through the masters.
// output to log when verbose >= 1 and debug build
std::clog << "Not direct copy. Try to copy data from the masters."
<< std::endl;
#endif
auto src_master = src_exec->get_master().get();
if (num_elems > 0 && src_master != src_exec) {
auto *master_ptr = src_exec->get_master()->alloc<T>(num_elems);
Expand Down

0 comments on commit 883dd5c

Please sign in to comment.