Cambricon / mlu-ops

Efficient operation implementation based on the Cambricon Machine Learning Unit (MLU) .
MIT License
103 stars 102 forks source link

[Feature](mluops): Normalize assert #1085

Closed chqy99 closed 2 weeks ago

chqy99 commented 1 month ago

Thanks for your contribution and we appreciate it a lot. :rocket::rocket:

1. Motivation

assert 只在 debug 模式下使能,gtest端将assert用GTEST_CHECK替代,host端不应该使用assert而是做paramcheck,device端检查真值使用MLU_KERNEL_ASSERT

2. Modification

MLU_KERNEL_ASSERT 宏更新 gtest端 assert 替换 pre-commit 检查更新,不会再防住 static_assert 等