mirror of https://github.com/google/gemma.cpp.git
parent
a9be065c28
commit
0d406061c0
4
run.cc
4
run.cc
|
|
@ -66,8 +66,8 @@ void ShowConfig(LoaderArgs& loader, InferenceArgs& inference, AppArgs& app) {
|
||||||
<< std::thread::hardware_concurrency() << std::endl
|
<< std::thread::hardware_concurrency() << std::endl
|
||||||
<< "Instruction set : "
|
<< "Instruction set : "
|
||||||
<< hwy::TargetName(hwy::DispatchedTarget()) << " ("
|
<< hwy::TargetName(hwy::DispatchedTarget()) << " ("
|
||||||
<< hwy::VectorBytes() * 8 << " bits)"
|
<< hwy::VectorBytes() * 8 << " bits)" << "\n"
|
||||||
<< "\n"
|
<< "Compiled config : " << CompiledConfig() << "\n"
|
||||||
<< "Weight Type : "
|
<< "Weight Type : "
|
||||||
<< gcpp::TypeName(gcpp::WeightT()) << "\n"
|
<< gcpp::TypeName(gcpp::WeightT()) << "\n"
|
||||||
<< "EmbedderInput Type : "
|
<< "EmbedderInput Type : "
|
||||||
|
|
|
||||||
18
util/app.h
18
util/app.h
|
|
@ -36,6 +36,24 @@
|
||||||
|
|
||||||
namespace gcpp {
|
namespace gcpp {
|
||||||
|
|
||||||
|
static inline const char* CompiledConfig() {
|
||||||
|
if (HWY_IS_ASAN) {
|
||||||
|
return "asan";
|
||||||
|
} else if (HWY_IS_MSAN) {
|
||||||
|
return "msan";
|
||||||
|
} else if (HWY_IS_TSAN) {
|
||||||
|
return "tsan";
|
||||||
|
#if defined(HWY_IS_UBSAN)
|
||||||
|
} else if (HWY_IS_UBSAN) {
|
||||||
|
return "ubsan";
|
||||||
|
#endif
|
||||||
|
} else if (HWY_IS_DEBUG_BUILD) {
|
||||||
|
return "dbg";
|
||||||
|
} else {
|
||||||
|
return "opt";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static inline void PinThreadToCore(size_t cpu_index) {
|
static inline void PinThreadToCore(size_t cpu_index) {
|
||||||
#if HWY_OS_LINUX
|
#if HWY_OS_LINUX
|
||||||
// Forces the thread to run on the logical processor with the same number.
|
// Forces the thread to run on the logical processor with the same number.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue