moskewcz / boda

Boda: A C++ Framework for Efficient Experiments in Computer Vision

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Understanding the input and output files when running ops-prof

dinhv opened this issue · comments

commented

When running the ops-prof mode with the following command

boda ops-prof --out-fn="%(boda_output_dir)/cnn_op_info.txt" --kg-tune-tag=ocl-def --func-mrd-toler="(cudnn_conv=4e-4)" --wisdom-out-fn="%(boda_output_dir)/wisdom.wis" --ops-fn="%(boda_test_dir)/sgemm-ops-debug.txt" --gen-data="(str_vals=(type=gen_data),nda_vals=(vi=(tn=float,v=0.0),mode=(tn=uint32_t,v=5)))" --wisdom-in-fn="%(boda_test_dir)/good_tr/sgemm-gen5/wisdom.wis" --op-tunes="(ocl-def=(use_be=ocl,),ocl4-16-4lm0(use_be=ocl,MNt=4:4,MNb=16:16,Kb=4,use_local_mem=0),ocl-4-16-4-lm2-vw4=(use_be=ocl,MNt=4:4,MNb=16:16,Kb=4,use_local_mem=2,vw=4),ocl-4-16-4-lm3-vw4=(use_be=ocl,MNt=4:4,MNb=16:16,Kb=4,use_local_mem=3,vw=4))"

it gets as input the following file
sgemm-ops-debug.txt
(str_vals=(type=sgemm),nda_vals=(a=(dims=(K=2048,M=2048)),b=(dims=(K=2048,N=2048)),c=(dims=(M=2048,N=2048))))

and produces the following file
cnn_op_info.txt
***ALL IS WELL***

And when I run it without a wisdom input file, the cnn_op_info.txt contains
----- errors for op_ix=0 op='(str_vals=(type=sgemm),nda_vals=(a=(dims=(K=2048,M=2048)),b=(dims=(K=2048,N=2048)),c=(dims=(M=2048,N=2048))))' -- comp fail for op_tune='(use_be=ocl)' digest mrd_comp() vs '(use_be=ocl)' skipped, no input wisdom availible -- comp fail for op_tune='(use_be=ocl,MNt=4:4,MNb=16:16,Kb=4,use_local_mem=0)' digest mrd_comp() vs '(use_be=ocl,MNt=4:4,MNb=16:16,Kb=4,use_local_mem=0)' skipped, no input wisdom availible -- comp fail for op_tune='(use_be=ocl,MNt=4:4,MNb=16:16,Kb=4,use_local_mem=2,vw=4)' digest mrd_comp() vs '(use_be=ocl,MNt=4:4,MNb=16:16,Kb=4,use_local_mem=2,vw=4)' skipped, no input wisdom availible -- comp fail for op_tune='(use_be=ocl,MNt=4:4,MNb=16:16,Kb=4,use_local_mem=3,vw=4)' digest mrd_comp() vs '(use_be=ocl,MNt=4:4,MNb=16:16,Kb=4,use_local_mem=3,vw=4)' skipped, no input wisdom availible ***ALL IS WELL***

My questions are

  1. What's the purpose of the sgemm-ops-debug.txt file?
  2. What's the purpose of the cnn_op_info.txt file? Why does it sometimes contains these errors? What do these errors telling me?

Since the sgemm-ops-debug.txt file is given as the value of the --ops-fn option, it is used as the list of operations to profile.
In this case, it's only got one operation, which is why it is named '-debug'; it's handy for debugging to try running on a single operation.

The cnn_op_info.txt file is simply the output of running this command; the name of the file can be changed, but that's the default.
Running the ops-prof mode has two general purposes:

  • To get the run-time (speed) of running some operation(s) using some set(s) of tuning paramters
  • To verify the numerical correctness of the running the operations with the requested set(s) of tuning paramters.

the errors you're seeing in the output are really more like warnings, and are related to the second point. since no known-good results were given (since you ran without an input wisdom file; although the same will occur if the input wisdom file has no known-good results), boda can't check against a known-good result, and it's complaining about it to make sure you know that such a comparison was not performed.

by default, boda will also compare the results between running each operations under all sets of tuning parameters.

but, bear in mind that if you only run one set of tuning parameters, and provide no known-good results, then no correctness testing at all will be performed.