question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[TOPI] Fast mode in take op

See original GitHub issue

Currently topi.take supports two modes, “clip” and “wrap”, following the numpy take convention (https://docs.scipy.org/doc/numpy/reference/generated/numpy.take.html). However, the clipping operation makes the take op 30% slower when the input shape is sufficiently large, for example with input shape [20, 1500] and indices shape [750]. I would like to propose add a “fast” mode, similar to the numpy “raise” mode, with no clipping, wrapping, or raising error when the indices are out of range. The user will be responsible to make sure the indices are in range.

cc @ajtulloch, @antinucleon

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
antinucleoncommented, Jun 8, 2019

I agree that adding assert stmt may also slow down the op. I think it’s okay to add “fast” mode in take and add warning in the doc.

How about adding a compile time warning as well?

0reactions
hlu1commented, Jun 9, 2019

LOG(WARNING) should do. Please review https://github.com/dmlc/tvm/pull/3325

Read more comments on GitHub >

github_iconTop Results From Across the Web

tvm.topi — tvm 0.11.dev0 documentation - Apache TVM
TOPI is the operator collection library for TVM, to provide sugars for ... Numpy style cumprod op. ... take (a, indices[, axis, batch_dims,...
Read more >
[TVM Discuss] [Questions] [ TOPI ] Winograd ... - The Mail Archive
[/quote] I want to ask how to use one template which is implemented by TVM to ... The strategy to select implementations for...
Read more >
ARM9E-S Core Technical Reference Manual r2p1
Instruction Cycles Instruction. bus Data. bus CLZ 1 1S 1I Data Op 1 1S 1I Data Op 2 1S+1I 2I
Read more >
Hardware acceleration | Android Developers
You can use the Paint parameter to apply color filters, special blending modes, or opacity to a layer. A view can use one...
Read more >
Elden Ring - Easy Infinite Rune Location + Map - Gaming Intel
However, they can deal a lot of damage, so be careful! Fast travel to the Farum Greatbridge Site of Grace when you are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found