cutf::debug::fp::*bitstring_t: This structure contains same size integer type of a given floating point type.
using bitstring_t = typename cutf::debug::fp::bitstring_t<half>::type;
// bitstring_t = uint16_tcutf::debug::print::*print_bin: This function prints bitstring of an input variableprint_hex: This function prints hex-code of an input variable
Supported types are below.
- Integer :
uint8_t,uint16_t,uint32_t,uint64_t - Floating point :
half,float,double
print_matrix: This function prints a matrix.print_matrix_from_host: This function prints a matrix on the device memory from host code.print_matrix_debug: This function prints a matrix in hex.print_matrix_hex_from_host: This function prints a matrix on the device memory from host code in hex.print_numpy_matrix: This function prints a matrix as a numpy matrix format.print_numpy_matrix_from_host: This function prints a matrix as a numpy matrix format on the device memory from host code.
cutf::debug::print::print_matrix(mat_ptr, M, N, ldm, "mat_a");
cutf::debug::print::print_numpy_matrix(mat_ptr, M, N, ldm, "mat_a");print_fragment: This function prints each element of a fragment.
nvcuda::wmma::fragment<nvcuda::wmma::matrix_a, N, N, N, half, nvcuda::wmma::col_major> fragment;
nvcuda::wmma::load_matrix_sync(fragment, mat, N);
cutf::debug::print::print_fragment(fragment, "frag");cutf::debug::time_breakdown::profiler profiler(cuda_stream);
// put some operations between start and stop functions
profiler.start_timer_sync("malloc_a");
cudaMalloc(...);
profiler.stop_timer_sync("malloc_a");
// give some operations to measure function as a lambda function
profiler.measure("malloc_b", [&](){cudaMalloc(...);});
// output time breakdown
profiler.print_result();# cutf time breakdown result (Total: 3.396 [ms])
Name Total [ms] N Avg [ms] Min [ms] Max [ms]
cudaMemcpy 2.225 ( 65.52%) 1 2.225 2.225 2.225
add_1_kernel 1.070 ( 31.52%) 100 0.011 0.010 0.015
cudaMalloc 0.081 ( 2.39%) 1 0.081 0.081 0.081
init_kernel 0.019 ( 0.57%) 1 0.019 0.019 0.019
See clock_breakdown.