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
This commit is contained in:
@@ -79,6 +79,7 @@ cdef public int get_tokens(WordList* wl, const char *filename):
|
|||||||
try:
|
try:
|
||||||
words = next(g)
|
words = next(g)
|
||||||
except StopIteration:
|
except StopIteration:
|
||||||
|
eprint(f'Text {fnu} depleted, restarting...')
|
||||||
tokenizers[fnu] = nn.token_generator(fnu)
|
tokenizers[fnu] = nn.token_generator(fnu)
|
||||||
g = tokenizers[fnu]
|
g = tokenizers[fnu]
|
||||||
words = next(g)
|
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():
|
cdef public object create_network():
|
||||||
try:
|
try:
|
||||||
net = nn.create_cbow_network()
|
net = nn.create_cbow_network()
|
||||||
eprint(net)
|
|
||||||
return net
|
return net
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
eprint(e)
|
eprint(e)
|
||||||
@@ -169,7 +169,7 @@ cdef public void update_weightlist(WeightList* wl, object net):
|
|||||||
cdef public void combo_weights(
|
cdef public void combo_weights(
|
||||||
WeightList* wl_frank, WeightList* wls, size_t num_weights
|
WeightList* wl_frank, WeightList* wls, size_t num_weights
|
||||||
):
|
):
|
||||||
"""Not a one-liner anymore :/"""
|
"""Not a one-liner anymore \_(".)_/"""
|
||||||
alpha = 1. / num_weights
|
alpha = 1. / num_weights
|
||||||
frank = wrap_weight_list(wl_frank)
|
frank = wrap_weight_list(wl_frank)
|
||||||
for w in 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):
|
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 = []
|
weights = []
|
||||||
for i in range(wl.n_weights):
|
for i in range(wl.n_weights):
|
||||||
w_shape = <long[:wl.weights[i].dims]>wl.weights[i].shape
|
w_shape = <long[:wl.weights[i].dims]>wl.weights[i].shape
|
||||||
@@ -231,4 +231,4 @@ def ensure_contiguous(a):
|
|||||||
|
|
||||||
|
|
||||||
def eprint(*args, **kwargs):
|
def eprint(*args, **kwargs):
|
||||||
return print(*args, flush=True, **kwargs)
|
return print(*args, flush=True, file=stderr, **kwargs)
|
||||||
|
|||||||
2
main.c
2
main.c
@@ -415,7 +415,7 @@ void dispatcher() {
|
|||||||
float delta_t = finish - start;
|
float delta_t = finish - start;
|
||||||
float delta_l = first_loss - crt_loss;
|
float delta_l = first_loss - crt_loss;
|
||||||
INFO_PRINTF(
|
INFO_PRINTF(
|
||||||
"Laptop MPI adam consecutive_batch "
|
"WIKI MPI adam consecutive_batch "
|
||||||
"W%lu E%lu BS%lu bpe%lu LPR%d pp%lu,"
|
"W%lu E%lu BS%lu bpe%lu LPR%d pp%lu,"
|
||||||
"%f,%f,%f,%f,"
|
"%f,%f,%f,%f,"
|
||||||
"%lu,%.0f,%lu\n",
|
"%lu,%.0f,%lu\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user