Based on discussions offline with @magnatelee, it appears that cunumeric's reduction operations are relatively slow. I replaced the reduction operation of "count_non_zeros" in the Nonzero task with a thrust::transform_reduce, and found that I achieved much better performance. I also tested out removing the accessor and directly indexing the input buffers and saw little change in performance.
Based on discussions offline with @magnatelee, it appears that cunumeric's reduction operations are relatively slow. I replaced the reduction operation of "count_non_zeros" in the
Nonzerotask with athrust::transform_reduce, and found that I achieved much better performance. I also tested out removing the accessor and directly indexing the input buffers and saw little change in performance.