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

Memoization #59

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Memoization #59

wants to merge 2 commits into from

Conversation

hypercubestart
Copy link
Collaborator

working on #7,

test_name original memo
access_cartesian_product 28,724 ns/iter (+/- 3,391) 30,334 ns/iter (+/- 3,681)
access_concatenate_0 1,341 ns/iter (+/- 105) 3,336 ns/iter (+/- 305)
access_concatenate_1 1,754 ns/iter (+/- 147) 3,690 ns/iter (+/- 1,929)
access_pad 2,294 ns/iter (+/- 229) 3,094 ns/iter (+/- 846)
access_pair_0 1,506 ns/iter (+/- 124) 3,455 ns/iter (+/- 244)
access_pair_1 2,196 ns/iter (+/- 198) 4,131 ns/iter (+/- 221)
access_pair_2 2,126 ns/iter (+/- 113) 4,056 ns/iter (+/- 235)
access_slice_0 861 ns/iter (+/- 93) 2,031 ns/iter (+/- 204)
access_slice_1 915 ns/iter (+/- 514) 1,987 ns/iter (+/- 104)
access_slice_2 1,138 ns/iter (+/- 328) 2,243 ns/iter (+/- 143)
access_windows 21,145 ns/iter (+/- 2,394) 22,899 ns/iter (+/- 2,094)
compute_dot_product_0 2,126 ns/iter (+/- 605) 3,115 ns/iter (+/- 167)
compute_dot_product_1 3,288 ns/iter (+/- 382) 4,318 ns/iter (+/- 305)
compute_elementwise_add_0 1,199 ns/iter (+/- 80) 2,152 ns/iter (+/- 655)
compute_elementwise_mul_0 1,219 ns/iter (+/- 144) 2,132 ns/iter (+/- 228)
compute_reduce_sum_0 1,985 ns/iter (+/- 218) 3,019 ns/iter (+/- 244)
compute_reduce_sum_1 1,203 ns/iter (+/- 274) 2,175 ns/iter (+/- 283)
compute_reduce_sum_2 1,736 ns/iter (+/- 174) 2,709 ns/iter (+/- 477)
compute_reduce_sum_3 1,146 ns/iter (+/- 74) 2,071 ns/iter (+/- 150)
compute_relu_0 610 ns/iter (+/- 33) 1,518 ns/iter (+/- 119)
compute_relu_1 643 ns/iter (+/- 52) 1,526 ns/iter (+/- 108)
mobilenet_shallow stack overflow 114,933,006 ns/iter (+/- 2,813,140)

@hypercubestart hypercubestart mentioned this pull request Oct 16, 2020
@hypercubestart
Copy link
Collaborator Author

hypercubestart commented Oct 23, 2020

on hold for now...because of difficulty of getting lifetimes to work out. Ideally, we could use ArrayViews that reference owned arrays already in the hashmap, but Rust doesn't like this.

  • CowArray (doesn't work because view variant has lifetimes, so if we insert array back into hashmap, we end up borrowing the hashmap mutably + immutably)
  • Wrap with RC and see if that works (same error as cowarray)
  • ArcArray (shared references, but same benchmarks as naive copying)
  • Try out data structure idea (see whether there’s a better datatype for what we’re trying to do, better than hashmap, i.e an insert-only datastructure that guarantees that lifetimes do not change when we insert) (not quite sure if this is expressible in rust?)
  • Adding a enum wrapper over ndarrray that holds owned data or views/shared data ArrayBase<MyCustomRepr…, >
  • unsafe

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.

1 participant