"git@developer.sourcefind.cn:yangql/googletest.git" did not exist on "df428ec11891f12c81e2872c0432e342b5403a34"
Unverified Commit 11aa0c14 authored by PanZezhong1725's avatar PanZezhong1725 Committed by GitHub
Browse files

issue/719 add more logs

parent 0f5e66ce
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <type_traits> #include <type_traits>
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
#include <spdlog/spdlog.h>
namespace infinicore::nn { namespace infinicore::nn {
class Module { class Module {
......
...@@ -40,7 +40,10 @@ inline struct SpdlogInitializer { ...@@ -40,7 +40,10 @@ inline struct SpdlogInitializer {
if (first_device___ != (tensor___)->device()) { \ if (first_device___ != (tensor___)->device()) { \
throw std::runtime_error("Tensor devices mismatch " \ throw std::runtime_error("Tensor devices mismatch " \
+ first_device___.toString() + " vs " \ + first_device___.toString() + " vs " \
+ (tensor___)->device().toString() + "."); \ + (tensor___)->device().toString() \
+ " from " + std::string(__func__) \
+ " at " + std::string(__FILE__) \
+ ":" + std::to_string(__LINE__) + "."); \
} \ } \
} \ } \
} while (0) } while (0)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment