Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,9 @@ set(BUILD_SHARED_LIBS OFF)

if (TCNN_EXTERNAL_FMT)
list(APPEND TCNN_LIBRARIES "${TCNN_EXTERNAL_FMT}")
list(APPEND TCNN_DEFINITIONS -DFMT_UNICODE=0)
else()
set(FMT_UNICODE OFF CACHE BOOL " " FORCE)
add_subdirectory("dependencies/fmt")
list(APPEND TCNN_LIBRARIES fmt)
list(APPEND TCNN_INCLUDES "dependencies/fmt/include")
Expand Down
2 changes: 1 addition & 1 deletion dependencies/fmt
Submodule fmt updated 198 files
4 changes: 2 additions & 2 deletions include/tiny-cuda-nn/common_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void set_log_callback(const std::function<void(LogSeverity, const std::string&)>

template <typename... Ts>
void log(LogSeverity severity, const std::string& msg, Ts&&... args) {
log_callback()(severity, fmt::format(msg, std::forward<Ts>(args)...));
log_callback()(severity, fmt::format(fmt::runtime(msg), std::forward<Ts>(args)...));
}

template <typename... Ts> void log_info(const std::string& msg, Ts&&... args) { log(LogSeverity::Info, msg, std::forward<Ts>(args)...); }
Expand Down Expand Up @@ -304,7 +304,7 @@ std::string dfmt(uint32_t indent, const std::string& format, Ts&&... args) {
}
}

return fmt::format(join(lines, "\n"), std::forward<Ts>(args)...);
return fmt::format(fmt::runtime(join(lines, "\n")), std::forward<Ts>(args)...);
}

std::string to_lower(std::string str);
Expand Down
Loading