Skip to content

Commit

Permalink
[general] Fixed minor bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
cabrust committed Apr 26, 2017
1 parent c4ddf64 commit efee776
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/shell/Network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ CN24_SHELL_FUNC_IMPL(NetworkStatus) {

if(detailed_status && (state_ == NET_LOADED || state_ == NET_AND_TRAINER_LOADED)) {
LOGINFO << "Doing forward pass for statistics...";
input_layer_->ForceWeightsZero();
graph_->FeedForward();
for(NetGraphNode* node: graph_->GetNodes()) {
LOGINFO << "Node \"" << node->unique_name << "\", " << node->layer->GetLayerDescription();
Expand Down
9 changes: 6 additions & 3 deletions src/util/Init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -504,10 +504,13 @@ cl_program CLHelper::CreateProgram ( const char* file_name ) {

if ( error != CL_SUCCESS ) {
char build_log[16384];
clGetProgramBuildInfo ( program, device, CL_PROGRAM_BUILD_LOG, 16384, build_log, NULL );
LOGERROR << "Error compiling kernel " << file_name << ":\n" << std::string ( build_log );
cl_int new_error = clGetProgramBuildInfo ( program, device, CL_PROGRAM_BUILD_LOG, 16384, build_log, NULL );
if ( new_error != CL_SUCCESS ) {
LOGERROR << "Compilation failed and clGetProgramBuildInfo failed as well :( error code: " << new_error;
} else {
LOGERROR << "Error compiling kernel " << file_name << ":\n" << std::string ( build_log );
}
LOGERROR << "Error code: " << error;
LOGERROR << "Kernel content: " << kernel_content;
FATAL ( "Compilation failed, exiting..." );
}

Expand Down

0 comments on commit efee776

Please sign in to comment.