MCPcopy Create free account
hub / github.com/NVIDIA/FasterTransformer / getAMax

Function getAMax

tests/unittests/fp8_gemm_test/worker.cpp:55–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55void getAMax(float* amax_ptr, float* input, const int m, const int n)
56{
57 for (int i = 0; i < m; i++) {
58 for (int j = 0; j < n; j++) {
59 if (i == 0) {
60 // amax_ptr[j] = fabs(input[i * n + j]) / 127.f;
61 amax_ptr[j] = 1.0f;
62 }
63 // else {
64 amax_ptr[j] = std::max(amax_ptr[j], fabs(input[i * n + j]) / 127.f);
65 // }
66 }
67 }
68}
69
70//------------------------------------------------
71

Callers 1

cublasTesterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected