some minor changes to NNUE interference | bench 1136338
This commit is contained in:
1 parent
d73ed3b98d
commit
0a8d7ca2f5
5 files changed
+47
-43
No files matched your search
+14
-8
@@ -7,19 +7,25 @@
|
||||
|
||||
class Board;
|
||||
|
||||
#ifdef __AVX512F__
|
||||
constexpr usize ALIGNMENT = 64;
|
||||
#else
|
||||
constexpr size_t ALIGNMENT = 32;
|
||||
#endif
|
||||
|
||||
namespace NNUE {
|
||||
|
||||
constexpr int INPUT_SIZE = 768;
|
||||
constexpr int HL_SIZE = 128;
|
||||
constexpr size_t INPUT_SIZE = 768;
|
||||
constexpr size_t HL_SIZE = 128;
|
||||
|
||||
constexpr int SCALE = 400;
|
||||
constexpr int QA = 255;
|
||||
constexpr int QB = 64;
|
||||
constexpr int16_t SCALE = 400;
|
||||
constexpr int16_t QA = 255;
|
||||
constexpr int16_t QB = 64;
|
||||
|
||||
struct Network {
|
||||
alignas(32) std::array<int16_t, HL_SIZE * INPUT_SIZE> accumulator_weights;
|
||||
alignas(32) std::array<int16_t, HL_SIZE> accumulator_biases;
|
||||
alignas(32) std::array<int16_t, 2 * HL_SIZE> output_weights;
|
||||
alignas(ALIGNMENT) std::array<int16_t, HL_SIZE * INPUT_SIZE> accumulator_weights;
|
||||
alignas(ALIGNMENT) std::array<int16_t, HL_SIZE> accumulator_biases;
|
||||
alignas(ALIGNMENT) std::array<int16_t, 2 * HL_SIZE> output_weights;
|
||||
int16_t output_bias;
|
||||
|
||||
void Load(const std::string& path);
|
||||
|
||||
Reference in new issue
Block a user