Closed certik closed 1 year ago
maxloc
open PR by @Thirumalai-Shaktivel: https://github.com/lfortran/lfortran/pull/1328. I suppose minloc
will have identical implementation too. @Thirumalai-Shaktivel can you please take this up and try to get the open PR merged?
Sorry for the delay, I will finish both by the end of the day!
Thank you @Thirumalai-Shaktivel! It doesn't need to be implemented in full generality, just what is needed for fastGPT:
merge_pair_idx = minloc(pair_scores, 1)
next_id = maxloc(logits(:,n_seq_x), dim=1)-1
Both seem to be just 1D arrays.
https://github.com/certik/fastGPT/commit/d4c6190414e45d421df89180cfa92d89d93a4803
https://github.com/certik/fastGPT/commit/0e01ebc87d8602be07054762a8141c6d7e34ca9f