Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,12 @@ struct index
static constexpr void for_stride(index_int start, N n, Stride stride, F f)
{
MIGRAPHX_ASSERT(start < stride);
if constexpr(not is_integral<N>{} and not is_integral<Stride>{})

if constexpr(not is_integral<N>{} and n < 1)
{
return;
}
else if constexpr(not is_integral<N>{} and not is_integral<Stride>{})
{
if constexpr(max_stride_iterations(n, stride) == 1)
{
Expand Down
3 changes: 3 additions & 0 deletions test/verify/test_topk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,6 @@ template struct test_topk<migraphx::shape::float_type, 100, 80000>;
template struct test_topk<migraphx::shape::float_type, 1000, 1875>;
template struct test_topk<migraphx::shape::float_type, 1000, 120000>;
template struct test_topk<migraphx::shape::float_type, 1029, 80000>;

template struct test_topk<migraphx::shape::int32_type, 1, 256>;
template struct test_topk<migraphx::shape::int32_type, 1, 1024>;
Loading