How inst_executed.sum is calculated?

I would like to know How smsp__inst_executed.sum is calculated according to the following stats:

Metric Name                    Metric Unit Minimum          Maximum          Average
------------------------------ ----------- ---------------- ---------------- ----------------
smsp__inst_executed.avg        inst        23783.308824     23783.308824     23783.308824
smsp__inst_executed.max        inst        24180.000000     25530.000000     24754.587083
smsp__inst_executed.min        inst        21480.000000     23270.000000     22711.075785
smsp__inst_executed.sum        inst        6469060.000000   6469060.000000   6469060.000000

What is the relation between that and others, e.g. avg? If we devide 6469060 by 32, it will be about 200K which is still far larger than the other three numbers.

You can check for the relation between the individual sub-metrics, like .sum and .avg. In this case, the .avg is across the individual SM sub-partitions.

The Minimum, Maximum and Average in your print are across the collected kernels.