Solved by yf225 in post #6 
              
              
                The ambiguity between IntArrayRef and DimnameList when a braced init-list is passed is unfortunate and we should find a way to fix it. Right now the best workaround is to pass in a std::vector<int64_t>({0, 4}) instead, as c10::IntArrayRef doesn’t own the underlying memory which could cause issues in…