-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Halide Layer #5370
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
base: master
Are you sure you want to change the base?
Halide Layer #5370
Conversation
This is true of Python layers too. Let's try to work out an arrangement for both. |
8f58408 to
1be1516
Compare
1. some blob name logic 2. move to _argv interface of halide objects. 3. lint.
Addesses the following isssues: 1. Remove commented code 2. Fix cmake build to remove path constants (requires 36473f32) 3. Fix up forward defs in headers. 4. Made README.md more detailed 5. Lint
…ntime. Also 1. Removed plip function replaced with testfunc. 2. Removed test subdirectory in halide dir. 3. spellchecked readme 4. fixup to syncedmem.hpp 5. updated cmake after removing plip func.
|
Note: github is sorting commits by time-stamp not order, so commits They are in the PR #5437. |
18d3c16 to
8f7e68e
Compare
0c72607 to
c1ba227
Compare
0ccd523 to
3ef314c
Compare
BlGene
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notes to self.
halide/generator/register_gen.cpp
Outdated
| blur_x(x, y, c, b) = (inp_c(x-1, y, c, b) + inp_c(x, y, c, b) + inp_c(x+1, y, c, b))/3; | ||
| blur_y(x, y, c, b) = (blur_x(x, y-1, c, b) + blur_x(x, y, c, b) + blur_x(x, y+1,c ,b))/3; | ||
|
|
||
| // The schedule - defines order, locality; implies storage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be removed.
halide/sync_halide.hpp
Outdated
| "than four axes"; | ||
| buffer_t buf = {}; | ||
| for (int i = 0; i < blob.num_axes(); ++i) { | ||
| // XXX reversing dimensions here -- should I? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All XXX should be removed from comments
halide/CMakeLists.txt
Outdated
|
|
||
| if(BUILD_halide) | ||
|
|
||
| #add_subdirectory(test) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be removed.
halide/CMakeLists.txt
Outdated
|
|
||
| #add_subdirectory(test) | ||
|
|
||
| # Target name modification |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The argument for keeping this is that I easily allows defining a separate CMake script in a subfolder, e.g. for tests.
halide/CMakeLists.txt
Outdated
| message(STATUS "Halide build: found generator ${in_obj} at ${infilePath}") | ||
| SET(outfile "${PROJECT_BINARY_DIR}/halide/${in_obj}.o") | ||
| set( in_tgt "${in_obj}${target_name_mod}") | ||
| #message(STATUS halide_generator_run_${in_tgt} "creates" ${outfile} ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove.
This is an extension of caffe that enables the calling of Halide functions as layers.
To test it please.
BUILD_halideoptionTODOs:
[build] fix make build
[build] add Halide to Travis + run layer tests
The process of building layers is still quite elaborate and a lot of cmake code went into masking this complexity. That said I'm not a cmake expert, so I would greatly appreciate if others had a look at his too. The build server will have to updated to install Halide to tests to pass.
Make layer zoo?
Once useful Halide layers start cropping up it would be nice to have a designated place to put them, together with some information on usage.
Further work for this is on hold till after the ICCV deadline.
Some additional things worth considering:
Halide Python Bindings
Halide has python bindings which are a nicer user interface. Whats the cleanest way to provide access to these?
Automatic Backward pass
Automatic backward functions for Halide would make it much easier to use. There has been some chatter about implementing this, but I don't know the current state of this.
This is an extension of @longjon prior work.
Simple Test script