SP , SM and thread

What is the formula to calculate

threads on each SM
blocks on each SM
warps on each SM

thanks