From 1338df9db25a8b78f4635f3ccbee7c67281c1b45 Mon Sep 17 00:00:00 2001 From: Pavel Lutskov Date: Thu, 12 Dec 2019 22:26:50 -0800 Subject: [PATCH] very nice scalability curve up to 12 procs parameters: wiki, BPE 250, BS 32, TARGET 8.3, the rest is commited also it might be that more pipelines would work if there were MANY more pipelines, but that remains to be seen until i buy myself a Ryzen 3700x and destroy the world with it i guess i should go to sleep now --- bridge.pyx | 8 ++++---- main.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bridge.pyx b/bridge.pyx index ebaacab..fae5af1 100644 --- a/bridge.pyx +++ b/bridge.pyx @@ -79,6 +79,7 @@ cdef public int get_tokens(WordList* wl, const char *filename): try: words = next(g) except StopIteration: + eprint(f'Text {fnu} depleted, restarting...') tokenizers[fnu] = nn.token_generator(fnu) g = tokenizers[fnu] words = next(g) @@ -118,7 +119,6 @@ cdef public void randidx(int* idx, size_t l, size_t how_much): cdef public object create_network(): try: net = nn.create_cbow_network() - eprint(net) return net except Exception as e: eprint(e) @@ -169,7 +169,7 @@ cdef public void update_weightlist(WeightList* wl, object net): cdef public void combo_weights( WeightList* wl_frank, WeightList* wls, size_t num_weights ): - """Not a one-liner anymore :/""" + """Not a one-liner anymore \_(".)_/""" alpha = 1. / num_weights frank = wrap_weight_list(wl_frank) for w in frank: @@ -188,7 +188,7 @@ cdef tuple cbow_batch(float* batch, size_t bs): cdef list wrap_weight_list(WeightList* wl): - """Thinly wraps a WeightList struct into a NumPy array.""" + """Thinly wraps a WeightList struct into a list of NumPy arrays.""" weights = [] for i in range(wl.n_weights): w_shape = wl.weights[i].shape @@ -231,4 +231,4 @@ def ensure_contiguous(a): def eprint(*args, **kwargs): - return print(*args, flush=True, **kwargs) + return print(*args, flush=True, file=stderr, **kwargs) diff --git a/main.c b/main.c index 498bcac..b5460bc 100644 --- a/main.c +++ b/main.c @@ -415,7 +415,7 @@ void dispatcher() { float delta_t = finish - start; float delta_l = first_loss - crt_loss; INFO_PRINTF( - "Laptop MPI adam consecutive_batch " + "WIKI MPI adam consecutive_batch " "W%lu E%lu BS%lu bpe%lu LPR%d pp%lu," "%f,%f,%f,%f," "%lu,%.0f,%lu\n",