Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
4 changes: 4 additions & 0 deletions src/targets/gpu/kernels/include/migraphx/kernels/index.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ 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 n < 1)
Comment thread
lakhinderwalia marked this conversation as resolved.
return;

Comment thread
lakhinderwalia marked this conversation as resolved.
Outdated
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