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

[topi][relay] Add operation scatter_add to relay, based on scatter implementation. #6030

Merged
merged 1 commit into from
Jul 16, 2020

Conversation

notoraptor
Copy link
Contributor

Hi! This is a pull request to add operation scatter_add in relay. Code is based on implementation of scatter previously added by @mbrookhart .

indices_np = np.random.randint(-dshape[axis], dshape[axis] - 1, ishape).astype("int64")

ref_res = ref_scatter_add(data_np, indices_np, updates_np, axis)
# TODO(mbrookhart): expand testing when adding more backend schedules
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance you got it to work on cuda? I haven't gotten back to this TODO yet :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Unfortunately, no! For the moment, I just need it on CPU ^^ !

Copy link
Contributor

@mbrookhart mbrookhart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@notoraptor
Copy link
Contributor Author

I got an unexpected error in jenkins:

running 3 tests

test graph::tests::test_str_to_type ... ok

test threading::tests::test_max_concurrency ... ok

test threading::tests::test_parallel_launch ... FAILED


failures:


---- threading::tests::test_parallel_launch stdout ----

thread 'threading::tests::test_parallel_launch' panicked at 'assertion failed: `(left == right)`

  left: `1`,

 right: `3`', runtime/src/threading.rs:244:13

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

It seems to come from Rust tests. I don't know why.

I just rebased the branch to relaunch tests again.

@notoraptor
Copy link
Contributor Author

All tests passed, this time !

@mbrookhart
Copy link
Contributor

@Laurawly @Huyuwei Could you take a look?

@tqchen tqchen merged commit 3912a64 into apache:master Jul 16, 2020
@tqchen
Copy link
Member

tqchen commented Jul 16, 2020

Thanks @notoraptor , @mbrookhart !

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

Successfully merging this pull request may close these issues.

3 participants