The present invention provides pyrimidinones that modulate activity of phosphoinositide 3-kinases (PI3Ks) and are useful in the treatment of diseases related to the activity of PI3Ks including, for example, inflammatory disorders, immune-based disorders, cancer, and other diseases.