Add error-checking for py binding, add missing include+hwasan check

PiperOrigin-RevId: 628453112
This commit is contained in:
Jan Wassenberg 2024-04-26 10:59:05 -07:00 committed by Copybara-Service
parent e8f59bb411
commit 7a12e29027
2 changed files with 6 additions and 0 deletions

View File

@ -89,6 +89,7 @@ cc_library(
deps = [ deps = [
":args", ":args",
":gemma_lib", ":gemma_lib",
"//compression:io",
"@hwy//:hwy", "@hwy//:hwy",
], ],
) )

View File

@ -31,6 +31,7 @@
#include <algorithm> // std::clamp #include <algorithm> // std::clamp
#include <thread> // NOLINT> #include <thread> // NOLINT>
#include "compression/io.h" // Path
#include "gemma/configs.h" #include "gemma/configs.h"
#include "gemma/gemma.h" #include "gemma/gemma.h"
#include "util/args.h" #include "util/args.h"
@ -45,6 +46,10 @@ static inline const char* CompiledConfig() {
return "msan"; return "msan";
} else if (HWY_IS_TSAN) { } else if (HWY_IS_TSAN) {
return "tsan"; return "tsan";
#if defined(HWY_IS_HWASAN)
} else if (HWY_IS_HWASAN) {
return "hwasan";
#endif
#if defined(HWY_IS_UBSAN) #if defined(HWY_IS_UBSAN)
} else if (HWY_IS_UBSAN) { } else if (HWY_IS_UBSAN) {
return "ubsan"; return "ubsan";