Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gather doesn't work with arange and rank 2 index #68

Open
Mgluhovskoi opened this issue Aug 8, 2024 · 1 comment
Open

Gather doesn't work with arange and rank 2 index #68

Mgluhovskoi opened this issue Aug 8, 2024 · 1 comment
Assignees

Comments

@Mgluhovskoi
Copy link
Collaborator

x_shape, axis, indices = ((3, 3, 2), 1 , (0,2))
x = np.arange(np.prod(x_shape)).reshape(x_shape)
indices_tp = tp.Tensor(indices)
a = tp.Tensor(x)
out = tp.gather(a, axis, indices_tp)
print(out) # throws exception

data = tp.iota((3, 3, 2))
indices = tp.Tensor([0, 2], dtype=tp.int32)
output = tp.gather(data, 1, indices)
print(output) # passes

The following works fine though:

x_shape, axis, indices = ((2, 3), 0, (1))
x = np.arange(np.prod(x_shape)).reshape(x_shape)
indices_tp = tp.Tensor(indices)
a = tp.Tensor(x)
out = tp.gather(a, axis, indices_tp)
print(out)
@Mgluhovskoi Mgluhovskoi added the bug label Aug 8, 2024
@parthchadha parthchadha self-assigned this Aug 9, 2024
@Mgluhovskoi Mgluhovskoi self-assigned this Aug 15, 2024
@Mgluhovskoi
Copy link
Collaborator Author

Issue is related to int64 not yet being supported. Should be fixed along with #116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants