"git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "e895952816dc4a9a04d1d82fb5f8bdee59341c06"
Unverified Commit b1e83b6e authored by xiang song(charlie.song)'s avatar xiang song(charlie.song) Committed by GitHub
Browse files

[Kernel] Use omp flush in CSRIsSorted (#1725)



* Use omp flush

* test

* test

* remove omp
Co-authored-by: default avatarUbuntu <ubuntu@ip-172-31-51-214.ec2.internal>
Co-authored-by: default avatarJinjing Zhou <VoVAllen@users.noreply.github.com>
parent 18a26fcf
...@@ -18,7 +18,7 @@ bool CSRIsSorted(CSRMatrix csr) { ...@@ -18,7 +18,7 @@ bool CSRIsSorted(CSRMatrix csr) {
const IdType* indptr = csr.indptr.Ptr<IdType>(); const IdType* indptr = csr.indptr.Ptr<IdType>();
const IdType* indices = csr.indices.Ptr<IdType>(); const IdType* indices = csr.indices.Ptr<IdType>();
bool ret = true; bool ret = true;
#pragma omp parallel for shared(ret)
for (int64_t row = 0; row < csr.num_rows; ++row) { for (int64_t row = 0; row < csr.num_rows; ++row) {
if (!ret) if (!ret)
continue; continue;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment