Skip to content

[Bug] concat([x], axis=1) return random results #11895

Description

@ganler
import tvm
from tvm import relay
import numpy as np

x1_shape = (2, 1)

x1 = relay.var("x1", shape=x1_shape, dtype='int64')
concatenate = relay.op.concatenate([x1], axis=1)

f = relay.Function([x1], concatenate)

x1_val = np.array([[6], [5]], dtype='int64')

op_res = relay.create_executor('graph', device=tvm.cpu(), target='llvm').evaluate(f)(x1_val)
print(op_res)
print(f'should be equal to {x1_val}')

Expected behavior

op_res should be same as [[6], [5]].

Actual behavior

1st try:

image

2nd try:

image

3rd try:

image

Environment

ed638ef on Ubuntu 20.04.

cc: @masahi

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions