-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added template for data reader to pass conduit node from driver
added conduit to cmakelist fixed error with global_trainer_ added simple conduit datareader to hold conduit node prototyping use of data_store to hold conduit nodes fixing bug with input buffers not being sized correctly fixed problem with unpacking conduit node moving {trainer, dc, dr, ds setup} and {loading inference samples} to separate functions extended core API for many different input types removed old code from first lbann-core impl added simple run script Fix things that have drifted in LBANN Get core-drive compiling again clang-format batch_functional_inference_algorithm Steps toward debugging the segfault in the inference algo test The test no longer segfaults. Now it just fails. Don't shuffle when setting up for inference Fix a spacing issue Updated CMake to install the core driver Build the core-driver
- Loading branch information
Showing
19 changed files
with
607 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,18 @@ | ||
cmake_minimum_required(VERSION 3.18.0) | ||
project(my_lbann_test C CXX) | ||
cmake_minimum_required(VERSION 3.21.0) | ||
project(my_lbann_test CXX) | ||
find_package(LBANN 0.102.0 REQUIRED) | ||
add_executable(Main main.cpp) | ||
target_link_libraries(Main PRIVATE LBANN::lbann) | ||
find_package(Conduit CONFIG REQUIRED) | ||
add_executable(lbann-core main.cpp) | ||
target_link_libraries(lbann-core PRIVATE LBANN::lbann) | ||
|
||
#target_link_libraries(lbann-bin lbann) | ||
set_target_properties(lbann-core | ||
PROPERTIES | ||
OUTPUT_NAME lbann-core-driver | ||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) | ||
|
||
#list(APPEND LBANN_EXE_TGTS lbann-core) | ||
|
||
install(TARGETS lbann-core | ||
EXPORT LBANNTargets | ||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export AL_PROGRESS_RANKS_PER_NUMA_NODE=2 | ||
export OMP_NUM_THREADS=8 | ||
export MV2_USE_RDMA_CM=0 | ||
|
||
# This should be a checkpointed lenet model | ||
MODEL_LOC="path/to/checkpointed/model" | ||
|
||
./Main $MODEL_LOC | ||
./Main $MODEL_LOC --dist | ||
./Main $MODEL_LOC --conduit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
include/lbann/data_ingestion/readers/data_reader_conduit.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
//////////////////////////////////////////////////////////////////////////////// | ||
// Copyright (c) 2014-2021, Lawrence Livermore National Security, LLC. | ||
// Produced at the Lawrence Livermore National Laboratory. | ||
// Written by the LBANN Research Team (B. Van Essen, et al.) listed in | ||
// the CONTRIBUTORS file. <[email protected]> | ||
// | ||
// LLNL-CODE-697807. | ||
// All rights reserved. | ||
// | ||
// This file is part of LBANN: Livermore Big Artificial Neural Network | ||
// Toolkit. For details, see http://software.llnl.gov/LBANN or | ||
// https://github.com/LLNL/LBANN. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "Licensee"); you | ||
// may not use this file except in compliance with the License. You may | ||
// obtain a copy of the License at: | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | ||
// implied. See the License for the specific language governing | ||
// permissions and limitations under the license. | ||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
#ifndef LBANN_DATA_READER_CONDUIT_HPP | ||
#define LBANN_DATA_READER_CONDUIT_HPP | ||
|
||
#include "lbann/data_readers/data_reader.hpp" | ||
#include "lbann/data_store/data_store_conduit.hpp" | ||
|
||
namespace lbann { | ||
/** | ||
* A generalized data reader for passed in conduit nodes. | ||
*/ | ||
class conduit_data_reader : public generic_data_reader | ||
{ | ||
public: | ||
conduit_data_reader* copy() const override { return new conduit_data_reader(*this); } | ||
bool has_conduit_output() override { return true; } | ||
void load() override; | ||
bool fetch_conduit_node(conduit::Node& sample, int data_id) override; | ||
|
||
void set_data_dims(std::vector<int> dims); | ||
void set_label_dims(std::vector<int> dims); | ||
|
||
std::string get_type() const override { return "conduit_data_reader"; } | ||
int get_linearized_data_size() const override { | ||
int data_size = 1; | ||
for(int i : m_data_dims) { | ||
data_size *= i; | ||
} | ||
return data_size; | ||
} | ||
int get_linearized_label_size() const override { | ||
int label_size = 1; | ||
for(int i : m_label_dims) { | ||
label_size *= i; | ||
} | ||
return label_size; | ||
} | ||
|
||
protected: | ||
std::vector<int> m_data_dims; | ||
std::vector<int> m_label_dims; | ||
|
||
}; // END: class conduit_data_reader | ||
|
||
} // namespace lbann | ||
|
||
#endif // LBANN_DATA_READER_CONDUIT_HPP |
Oops, something went wrong.