Skip to content

Commit

Permalink
DEBUGGING
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Hoeflinger <[email protected]>
  • Loading branch information
danhoeflinger committed Jun 3, 2024
1 parent 251acbd commit ee300b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 42 deletions.
20 changes: 0 additions & 20 deletions clang/test/dpct/thrust_sort_by_key_usm.cu
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,6 @@ int main(void) {
thrust::sort_by_key( h_ptr, h_ptr+4, BH.begin());
thrust::sort_by_key( d_ptr, d_ptr+4, BD.begin());

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// CHECK:dpct::sort(oneapi::dpl::execution::seq, AH.begin(), AH.end(), BH.begin(), std::greater<int>());
// CHECK-NEXT:dpct::sort(oneapi::dpl::execution::make_device_policy(q_ct1), AD.begin(), AD.end(), BD.begin(), std::greater<int>());
// CHECK-NEXT:dpct::sort(oneapi::dpl::execution::seq, h_ptr, h_ptr + 4, BH.begin(), std::greater<int>());
// CHECK-NEXT:dpct::sort(oneapi::dpl::execution::seq, d_ptr, d_ptr + 4, BD.begin(), std::greater<int>());
// VERSION first last result comparator
thrust::sort_by_key( AH.begin(), AH.end(), BH.begin(), thrust::greater<int>());
thrust::sort_by_key( AD.begin(), AD.end(), BD.begin(), thrust::greater<int>());
thrust::sort_by_key( h_ptr, h_ptr+4, BH.begin(), thrust::greater<int>());
thrust::sort_by_key( d_ptr, d_ptr+4, BD.begin(), thrust::greater<int>());

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// CHECK:dpct::sort(oneapi::dpl::execution::seq, AH.begin(), AH.end(), BH.begin());
Expand All @@ -65,16 +55,6 @@ int main(void) {
thrust::sort_by_key(thrust::host, h_ptr, h_ptr+4, BH.begin());
thrust::sort_by_key(thrust::device, d_ptr, d_ptr+4, BD.begin());

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// CHECK:dpct::sort(oneapi::dpl::execution::seq, AH.begin(), AH.end(), BH.begin(), std::greater<int>());
// CHECK-NEXT:dpct::sort(oneapi::dpl::execution::make_device_policy(q_ct1), AD.begin(), AD.end(), BD.begin(), std::greater<int>());
// CHECK-NEXT:dpct::sort(oneapi::dpl::execution::seq, h_ptr, h_ptr + 4, BH.begin(), std::greater<int>());
// CHECK-NEXT:dpct::sort(oneapi::dpl::execution::make_device_policy(q_ct1), d_ptr, d_ptr + 4, BD.begin(), std::greater<int>());
// VERSION exec first last result comparator
thrust::sort_by_key(thrust::host, AH.begin(), AH.end(), BH.begin(), thrust::greater<int>());
thrust::sort_by_key(thrust::device, AD.begin(), AD.end(), BD.begin(), thrust::greater<int>());
thrust::sort_by_key(thrust::host, h_ptr, h_ptr+4, BH.begin(), thrust::greater<int>());
thrust::sort_by_key(thrust::device, d_ptr, d_ptr+4, BD.begin(), thrust::greater<int>());

return 0;
}
26 changes: 4 additions & 22 deletions clang/test/dpct/thrust_stable_sort_by_key_usm.cu
Original file line number Diff line number Diff line change
Expand Up @@ -36,41 +36,23 @@ int main(void) {
// CHECK:dpct::stable_sort(oneapi::dpl::execution::seq, AH.begin(), AH.end(), BH.begin());
// CHECK-NEXT:dpct::stable_sort(oneapi::dpl::execution::make_device_policy(q_ct1), AD.begin(), AD.end(), BD.begin());
// CHECK-NEXT:dpct::stable_sort(oneapi::dpl::execution::seq, h_ptr, h_ptr + 4, BH.begin());
// CHECK-NEXT:dpct::stable_sort(oneapi::dpl::execution::seq, d_ptr, d_ptr + 4, BD.begin());
// VERSION first last result
thrust::stable_sort_by_key( AH.begin(), AH.end(), BH.begin());
thrust::stable_sort_by_key( AD.begin(), AD.end(), BD.begin());
thrust::stable_sort_by_key( h_ptr, h_ptr+4, BH.begin());
thrust::stable_sort_by_key( d_ptr, d_ptr+4, BD.begin());

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// CHECK:dpct::stable_sort(oneapi::dpl::execution::seq, AH.begin(), AH.end(), BH.begin(), std::greater<int>());
// CHECK-NEXT:dpct::stable_sort(oneapi::dpl::execution::make_device_policy(q_ct1), AD.begin(), AD.end(), BD.begin(), std::greater<int>());
// CHECK-NEXT:dpct::stable_sort(oneapi::dpl::execution::seq, h_ptr, h_ptr + 4, BH.begin(), std::greater<int>());
// CHECK-NEXT:dpct::stable_sort(oneapi::dpl::execution::seq, d_ptr, d_ptr + 4, BD.begin(), std::greater<int>());
// VERSION first last result comparator
thrust::stable_sort_by_key( AH.begin(), AH.end(), BH.begin(), thrust::greater<int>());
thrust::stable_sort_by_key( AD.begin(), AD.end(), BD.begin(), thrust::greater<int>());
thrust::stable_sort_by_key( h_ptr, h_ptr+4, BH.begin(), thrust::greater<int>());

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// CHECK:dpct::stable_sort(oneapi::dpl::execution::seq, AH.begin(), AH.end(), BH.begin());
// CHECK-NEXT:dpct::stable_sort(oneapi::dpl::execution::make_device_policy(q_ct1), AD.begin(), AD.end(), BD.begin());
// CHECK-NEXT:dpct::stable_sort(oneapi::dpl::execution::seq, h_ptr, h_ptr + 4, BH.begin());
// CHECK-NEXT:dpct::stable_sort(oneapi::dpl::execution::make_device_policy(q_ct1), d_ptr, d_ptr + 4, BD.begin());
// VERSION exec first last result
thrust::stable_sort_by_key(thrust::host, AH.begin(), AH.end(), BH.begin());
thrust::stable_sort_by_key(thrust::device, AD.begin(), AD.end(), BD.begin());
thrust::stable_sort_by_key(thrust::host, h_ptr, h_ptr+4, BH.begin());
thrust::stable_sort_by_key(thrust::device, d_ptr, d_ptr+4, BD.begin());

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// CHECK:dpct::stable_sort(oneapi::dpl::execution::seq, AH.begin(), AH.end(), BH.begin(), std::greater<int>());
// CHECK-NEXT:dpct::stable_sort(oneapi::dpl::execution::make_device_policy(q_ct1), AD.begin(), AD.end(), BD.begin(), std::greater<int>());
// CHECK-NEXT:dpct::stable_sort(oneapi::dpl::execution::seq, h_ptr, h_ptr + 4, BH.begin(), std::greater<int>());
// CHECK-NEXT:dpct::stable_sort(oneapi::dpl::execution::make_device_policy(q_ct1), d_ptr, d_ptr + 4, BD.begin(), std::greater<int>());
// VERSION exec first last result comparator
thrust::stable_sort_by_key(thrust::host, AH.begin(), AH.end(), BH.begin(), thrust::greater<int>());
thrust::stable_sort_by_key(thrust::device, AD.begin(), AD.end(), BD.begin(), thrust::greater<int>());
thrust::stable_sort_by_key(thrust::host, h_ptr, h_ptr+4, BH.begin(), thrust::greater<int>());
thrust::stable_sort_by_key(thrust::device, d_ptr, d_ptr+4, BD.begin(), thrust::greater<int>());
thrust::stable_sort_by_key( d_ptr, d_ptr+4, BD.begin(), thrust::greater<int>());

return 0;
}

0 comments on commit ee300b6

Please sign in to comment.