| 30 | bool allow_gemm_test = false); |
| 31 | |
| 32 | int main(int argc, char** argv) |
| 33 | { |
| 34 | if (argc != 8 && argc != 9) { |
| 35 | FT_LOG_ERROR( |
| 36 | "bert_fp8_example_squad max_batch_size num_layers seq_len head_num size_per_head is_fp16 is_remove_padding"); |
| 37 | FT_LOG_ERROR("e.g., ./bin/bert_fp8_example_squad 32 24 384 16 64 1 1"); |
| 38 | return 0; |
| 39 | } |
| 40 | bool allow_gemm_test = false; |
| 41 | if (argc == 9) { |
| 42 | allow_gemm_test = (atoi(argv[8]) == 1) ? true : false; |
| 43 | } |
| 44 | |
| 45 | int max_batch_size = atoi(argv[1]); |
| 46 | int num_layers = atoi(argv[2]); |
| 47 | int seq_len = atoi(argv[3]); |
| 48 | int head_num = atoi(argv[4]); |
| 49 | int size_per_head = atoi(argv[5]); |
| 50 | bool is_remove_padding = static_cast<bool>(atoi(argv[7])); |
| 51 | |
| 52 | return bertExample<__nv_fp8_e4m3, __nv_bfloat16>( |
| 53 | max_batch_size, num_layers, head_num, size_per_head, is_remove_padding, allow_gemm_test); |
| 54 | } |
| 55 | |
| 56 | template<typename T1, typename T2> |
| 57 | int bertExample(size_t max_batch_size, |
nothing calls this directly
no outgoing calls
no test coverage detected