-
Notifications
You must be signed in to change notification settings - Fork 93
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
Gurobi wrapper #277
Gurobi wrapper #277
Conversation
Merge from master
Merge from master
Merge from master
Merge from master
Symbolic bound tightening in NLR (NeuralNetworkVerification#249)
Symbolic bound tightening over absolute values (NeuralNetworkVerification#251)
Merge from master
Merge from master
Merge from master
CMakeLists.txt
Outdated
if (${ENABLE_GUROBI}) | ||
add_compile_definitions(ENABLE_GUROBI) | ||
|
||
set(GUROBI_LIB1 "gurobi_c++") | ||
set(GUROBI_LIB2 "gurobi90") | ||
|
||
add_library(${GUROBI_LIB1} SHARED IMPORTED) | ||
set_target_properties(${GUROBI_LIB1} PROPERTIES IMPORTED_LOCATION ${GUROBI_DIR}/lib/libgurobi_c++.a) | ||
list(APPEND LIBS ${GUROBI_LIB1}) | ||
target_include_directories(${GUROBI_LIB1} INTERFACE ${GUROBI_DIR}/include/) | ||
|
||
add_library(${GUROBI_LIB2} SHARED IMPORTED) | ||
set_target_properties(${GUROBI_LIB2} PROPERTIES IMPORTED_LOCATION ${GUROBI_DIR}/lib/libgurobi90.so) | ||
list(APPEND LIBS ${GUROBI_LIB2}) | ||
target_include_directories(${GUROBI_LIB2} INTERFACE ${GUROBI_DIR}/include/) | ||
endif() |
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.
We need to automatically set GUROBI_DIR or/and add instructions to the README
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.
Yes :)
Merge from master
Merge from master
set_target_properties(${GUROBI_LIB2} PROPERTIES IMPORTED_LOCATION ${GUROBI_DIR}/lib/libgurobi90.so) | ||
list(APPEND LIBS ${GUROBI_LIB2}) | ||
target_include_directories(${GUROBI_LIB2} INTERFACE ${GUROBI_DIR}/include/) | ||
endif() | ||
|
||
# pthread | ||
set(THREADS_PREFER_PTHREAD_FLAG ON) |
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.
Did we make sure Gurobi uses 1 thread?
* types for PL constraints * first attempt at automatically constructing the NLR * first unit test, couple of bug fixes * use PiecewiseLinearFunctionType * cleanup * some cleanup, and store more information about discovered neurons * wip * complete the construction of the NLR * bug fixes * bug fix * dumping functionality * bug fix * test * changes per Aleks' comments * minor * python bindings * move nlr to separate dir, with namesapce * move neuron index to separate class * basic 'evaluate' functionality for non-consecutive layers * layer class * cleanup * oops * wip * wip * mechanism for extracting the bounds * SBT for weighted sum layers * symbolic bound propagation over a relu layer * support for variable elimination and reindexing * start restoring engine code * cloning NLRs and layers * clone NLRs as part of ipq cloning * reinstate * acas parser again creates an NLR * cleanup in Layer class * cleanup * dumping functoinality * bug fix in layer cloning * dump * bug fixes in copy ctor * bug fix * bug fix * warm restart functionality * property parsing * cleanup, better handling of eliminated neurons * a few more bug fixes * minor * auto construction of an NLR * reinstate tests * minor * cleanup * nlr renaming * unsupported types * cleanup * minor * reinstate the interval arithmetic bound propagation * another test reinstated * reinstate more tests * more tests * reinstate the remaining tests * cleanup * some clenaup * bug fix * cleanup * dont eliminate input/output variables * handle zero intervals * started playing with gurobi * basic wrapper functionality, and test * better options * support for compiling without Gurobi (default) * test fix * introducing a basic LP formalutor (WIP) * handling ReLUs in the LP relaxation * successfully creating the LP relaxation * some statistics * cleanup * trigger the new code * better NLR construction * cosmetics * oops * some cleanup * cleanup * wip * minor * travis * clear the boost cache * and now restore the cache * restore * cleanup * fix an issue from the merge * even with master * remove the notion of an "output layer" from the NLR * oops * code review comments * oops * farewell nlr * add default gurobi_dir * add build instructions for gurobi Co-authored-by: Guy Katz <guykatz@cs.huji.ac.il> Co-authored-by: Yuval Jacoby <yuval999@gmail.com>
* types for PL constraints * first attempt at automatically constructing the NLR * first unit test, couple of bug fixes * use PiecewiseLinearFunctionType * cleanup * some cleanup, and store more information about discovered neurons * wip * complete the construction of the NLR * bug fixes * bug fix * dumping functionality * bug fix * test * changes per Aleks' comments * minor * python bindings * move nlr to separate dir, with namesapce * move neuron index to separate class * basic 'evaluate' functionality for non-consecutive layers * layer class * cleanup * oops * wip * wip * mechanism for extracting the bounds * SBT for weighted sum layers * symbolic bound propagation over a relu layer * support for variable elimination and reindexing * start restoring engine code * cloning NLRs and layers * clone NLRs as part of ipq cloning * reinstate * acas parser again creates an NLR * cleanup in Layer class * cleanup * dumping functoinality * bug fix in layer cloning * dump * bug fixes in copy ctor * bug fix * bug fix * warm restart functionality * property parsing * cleanup, better handling of eliminated neurons * a few more bug fixes * minor * auto construction of an NLR * reinstate tests * minor * cleanup * nlr renaming * unsupported types * cleanup * minor * reinstate the interval arithmetic bound propagation * another test reinstated * reinstate more tests * more tests * reinstate the remaining tests * cleanup * some clenaup * bug fix * cleanup * dont eliminate input/output variables * handle zero intervals * started playing with gurobi * basic wrapper functionality, and test * better options * support for compiling without Gurobi (default) * test fix * introducing a basic LP formalutor (WIP) * handling ReLUs in the LP relaxation * successfully creating the LP relaxation * some statistics * cleanup * trigger the new code * better NLR construction * cosmetics * oops * some cleanup * cleanup * wip * minor * travis * clear the boost cache * and now restore the cache * restore * cleanup * fix an issue from the merge * even with master * remove the notion of an "output layer" from the NLR * oops * code review comments * oops * farewell nlr * add default gurobi_dir * add build instructions for gurobi Co-authored-by: Guy Katz <guykatz@cs.huji.ac.il> Co-authored-by: Yuval Jacoby <yuval999@gmail.com>
A basic interface for invoking Gurobi and extracting the results