Disclosed are compounds of Formula (I'), methods of using the compounds for inhibiting HPK1 activity and pharmaceutical compositions comprising such compounds. The compounds are useful in treating, preventing or ameliorating diseases or disorders associated with HPK1 activity such as cancer.本發明揭示具有式(I')之化合物、使用該等化合物抑制HPK1活性之方法及包含該等化合物之醫藥組合物。該等化合物可用於治療、預防或改善與HPK1活性相關之疾病或病症,諸如癌症。