[AutoTVM] CUDA runtime error when tuning extern ops

@comaniac @FrozenGene @merrymercy

I figured out what’s going on. The issue is random_fill function used by AutoTVM:

I’m trying to tune scatter op, which has an integer input as one of inputs. This poses two problems for random_fill.

  1. random_fill implementation is busted if the input is 32 or 64 bit integer tensor, see

As a result of this, the index tensor is filled with values like

array([1091617754, 1090832347, 1091032493, ..., 1084215127, 1073655395,
       1090813385], dtype=int32
  1. The value of index tensor cannot be any random values, since the entry is the index into the scattered tensor. In our relay test for example, the index tensor is initialized as follows:

How should we solve this issue? I think I’ll simply skip the random init when the workload is from scatter op.

2 Likes