mirror of https://github.com/google/gemma.cpp.git
Fix include order, required to build with profiler enabled
PiperOrigin-RevId: 680574177
This commit is contained in:
parent
5e812f07f5
commit
897f902d28
|
|
@ -24,8 +24,10 @@
|
|||
|
||||
// Compiles this file for multiple architectures via "foreach_target.h", to
|
||||
// which we pass the filename via macro 'argument'.
|
||||
// clang-format off
|
||||
#undef HWY_TARGET_INCLUDE
|
||||
#define HWY_TARGET_INCLUDE "backprop/backward.cc" // NOLINT
|
||||
// clang-format on
|
||||
#include "hwy/foreach_target.h" // IWYU pragma: keep
|
||||
|
||||
#include "hwy/highway.h"
|
||||
|
|
|
|||
|
|
@ -15,13 +15,15 @@
|
|||
|
||||
#include "gemma/weights.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
#include "compression/compress.h"
|
||||
#include "compression/io.h" // Path
|
||||
#include "gemma/common.h"
|
||||
#include "gemma/configs.h"
|
||||
#include "util/allocator.h"
|
||||
#include "hwy/base.h" // HWY_ABORT
|
||||
#include "hwy/contrib/thread_pool/thread_pool.h"
|
||||
#include "hwy/profiler.h"
|
||||
|
|
@ -72,7 +74,10 @@ struct LoadCompressedWeightsT {
|
|||
}
|
||||
HWY_ASSERT(scale_pos == TConfig::kNumTensorScales);
|
||||
}
|
||||
c_weights->Reshape();
|
||||
{
|
||||
PROFILER_ZONE("Startup.Reshape");
|
||||
c_weights->Reshape();
|
||||
}
|
||||
return c_weights_u8;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
#include "hwy/aligned_allocator.h"
|
||||
#include "hwy/base.h"
|
||||
#include "hwy/contrib/thread_pool/thread_pool.h"
|
||||
#include "hwy/profiler.h"
|
||||
|
||||
namespace gcpp {
|
||||
|
||||
|
|
@ -122,8 +121,6 @@ struct CompressedLayer {
|
|||
// after loading weights via ForEachTensor.
|
||||
// TODO: update compression/convert_weights to bake this in.
|
||||
void Reshape() {
|
||||
PROFILER_ZONE("Startup.Reshape");
|
||||
|
||||
constexpr size_t kModelDim = TConfig::kModelDim;
|
||||
constexpr size_t kHeads = TConfig::kHeads;
|
||||
constexpr size_t kQKVDim = TConfig::kQKVDim;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
#include "hwy/base.h"
|
||||
#include "hwy/contrib/thread_pool/thread_pool.h"
|
||||
#include "hwy/profiler.h"
|
||||
|
||||
#endif // THIRD_PARTY_GEMMA_CPP_OPS_MATVEC_INL_H_
|
||||
|
||||
|
|
@ -39,6 +38,7 @@
|
|||
#include "ops/dot-inl.h"
|
||||
#include "hwy/contrib/math/math-inl.h"
|
||||
#include "hwy/contrib/matvec/matvec-inl.h"
|
||||
#include "hwy/profiler.h" // also uses SIMD
|
||||
|
||||
HWY_BEFORE_NAMESPACE();
|
||||
namespace gcpp {
|
||||
|
|
|
|||
Loading…
Reference in New Issue