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

Improve speed of SP local inhibition, 70x slower than global #123

Open
breznak opened this issue Nov 27, 2018 · 1 comment
Open

Improve speed of SP local inhibition, 70x slower than global #123

breznak opened this issue Nov 27, 2018 · 1 comment

Comments

@breznak
Copy link
Member

breznak commented Nov 27, 2018

CC CUDA SP #50, SP faster LocalInho #86 , #92

From #119 (review) :

I'm evaluation the performance impact of ND vs 1D, where algorithmically the 1D is really simpler.

  • Global Inh
[ RUN      ] HelloSPTPTest.performance
starting test. DIM_INPUT=10000, DIM=2048, CELLS=10
EPOCHS = 1000
starting:  1000 iterations.Total elapsed time = 0 seconds
[       OK ] HelloSPTPTest.performance (1027 ms)
[----------] 1 test from HelloSPTPTest (1027 ms total)
  • Local, 1D (to be removed):
[ RUN      ] HelloSPTPTest.performance
starting test. DIM_INPUT=10000, DIM=2048, CELLS=10
EPOCHS = 1000
starting:  1000 iterations.Total elapsed time = 74 seconds
/home/mmm/devel/HTM/htm-community/nupic.cpp/src/test/unit/algorithms/HelloSPTPTest.cpp:101: Failure
Value of: timeTotal <= CI_avg_time
  Actual: false
Expected: true
HelloSPTP test slower than expected! (74,should be 45
[  FAILED  ] HelloSPTPTest.performance (74195 ms)
[----------] 1 test from HelloSPTPTest (74195 ms total)
  • local, ND (proposed default, resp. only choice):
[ RUN      ] HelloSPTPTest.performance
starting test. DIM_INPUT=10000, DIM=2048, CELLS=10
EPOCHS = 1000
starting:  1000 iterations.Total elapsed time = 75 seconds
/home/mmm/devel/HTM/htm-community/nupic.cpp/src/test/unit/algorithms/HelloSPTPTest.cpp:101: Failure
Value of: timeTotal <= CI_avg_time
  Actual: false
Expected: true
HelloSPTP test slower than expected! (75,should be 45
[  FAILED  ] HelloSPTPTest.performance (75335 ms)
[----------] 1 test from HelloSPTPTest (75335 ms total)

TL;DR

  • local inhibition is very slow! 70x (1s vs 74s global/local inhibition)
  • this PR (1D/ND) does not change that (-> 🆗 merge)
  • we should work on improving speed of local inh (Integrate CUDA SP as a C++ wrapper  #50 )
  • there are no unit tests for local inhibition!
@breznak
Copy link
Member Author

breznak commented Feb 20, 2020

Thanks to PR #769 local inhibition (only for wrapAround=true) is now 2x faster!

local inhibition is very slow! 70x (1s vs 74s global/local inhibition)

which equals to improvement and it's now only 10x slower than global inh!

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

No branches or pull requests

1 participant