         // Sort the index sequence by data.
         stable_sort_by_key(dp_data_first,
                            dp_data_last,
-                           dp_idx_first,
-                           less<T>());
+                           dp_idx_first);
     } else {
         // Generate key indices.
         dp_keys_first = device_pointer_cast(static_cast<size_t*>(keys_start));

        stable_sort_by_key(
            make_zip_iterator(make_tuple(dp_keys_first, dp_data_first)),
            make_zip_iterator(make_tuple(dp_keys_last, dp_data_last)),
            dp_idx_first,
            tuple_less<size_t, T>());
    }
}


/*
 * sort
 */

template <typename T>
void cupy::thrust::_sort(void *data_start, size_t *keys_start, const std::vector<ptrdiff_t>& shape) {
