Updated logging definitions to ensure it works using dynamic and static config

This commit is contained in:
Alejandro Saucedo 2020-09-04 07:01:58 +01:00
parent 1286da2179
commit c15a14d2b2
6 changed files with 31 additions and 31 deletions

View file

@ -18,8 +18,10 @@ Tensor::Tensor()
Tensor::Tensor(std::vector<float> data, TensorTypes tensorType)
{
#if DEBUG
SPDLOG_DEBUG(
"Kompute Tensor constructor data: {}, and type: {}", data, tensorType);
#endif
this->mData = data;
this->mShape = { static_cast<uint32_t>(data.size()) };

View file

@ -3,11 +3,13 @@
#include <vulkan/vulkan.hpp>
// SPDLOG_ACTIVE_LEVEL must be defined before spdlog.h import
#if !defined(SPDLOG_ACTIVE_LEVEL)
#if DEBUG
#ifndef SPDLOG_ACTIVE_LEVEL
#define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_DEBUG
#endif
#else
#define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_INFO
#endif
#endif
#ifndef KOMPUTE_LOG_OVERRIDE
#if KOMPUTE_ENABLE_SPDLOG