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

Function main

tests/unittests/fp8_gemm_test/main.cpp:10–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8//=====================================================================================================================
9
10int main()
11{
12 const int32_t m = 16;
13 const int32_t n = 32;
14 const int32_t k = 64;
15 const int32_t batch = 2;
16 const cublasOperation_t tA = CUBLAS_OP_T;
17 const cublasOperation_t tB = CUBLAS_OP_N;
18 const bool isStridedBatch = true;
19 const size_t aElemSize = sizeof(__nv_fp8_e4m3);
20 const size_t bElemSize = sizeof(__nv_fp8_e4m3);
21 const size_t cElemSize = sizeof(__nv_bfloat16);
22 const size_t dElemSize = sizeof(__nv_bfloat16);
23 const float aScale = 1.0f;
24 const float bScale = 2.0f;
25 const float cScale = 0.0f;
26 const float dScale = 1.0f;
27 const float epilogueAuxScale = 1.0f;
28 const bool initExtraPtrs = true;
29
30 const auto result = cublasTester({m, n, k, tA, tB, batch, isStridedBatch, aElemSize, bElemSize, cElemSize,
31 dElemSize, aScale, bScale, cScale, dScale, epilogueAuxScale, initExtraPtrs});
32
33 if (result != 0) {
34 std::cout << "In the end, something went wrong!" << std::endl;
35 }
36 else {
37 std::cout << "Everything is ok" << std::endl;
38 }
39}

Callers

nothing calls this directly

Calls 1

cublasTesterFunction · 0.70

Tested by

no test coverage detected