-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* minor fix in distributed memory SGD algo * minor * Added cmake option to load MKL-dnn libs * set MKL option to OFF as default * added memory manager include * fixed compilation issues: added missing magma/config.h includes * Added Resnet example using basic blocks * Using GPU training in cnn_2d example when CUDA is enabled * fixed bug in cnn_2d example when MPI is enabled * fixed bug in lenet5 and resnet example when MPI is enabled * fixed make build system * added example implementing resnet model for cifar10 dataset * added simple argument parser for examples * progressed on resnet model for cifar dataset; Added argument parser for examples * updated resnet cifar network * added support for a model summary * added virtual function to model class * minor * Added routines for building resnet model in new folder called models * added resnet model * Added bottleneck block * These ImageNet2012 references seem to be causing the build process to fail. Temporarily commenting them out for now. * Create basic Github CI (#36) This is just a test for now... * Updates to Github Action * run make within build directory * trigger build for all pull requests * update to build and run tests * Use same job to run tests Folder was deleted between jobs for some reason * cd into build dir before running ctest * Fixed crossentropy issue * Fixed MSE error * update name of job * Updated Co-Authors in README * check format with clang-format job * Restyle all files according to .clang-format style guideline (#38) Co-authored-by: flipflapflop <[email protected]> Co-authored-by: Rocco Febbo <[email protected]>
- Loading branch information
1 parent
76d23ff
commit 20820ee
Showing
133 changed files
with
4,349 additions
and
3,785 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: CI | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
push: | ||
branches: [ dev ] | ||
pull_request: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build-and-test: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- name: Setup CMake | ||
uses: jwlawson/[email protected] | ||
with: | ||
cmake-version: '3.16.x' | ||
|
||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
|
||
# Build makefiles | ||
- name: Run CMake | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake .. | ||
# Run makefiles | ||
- name: Build MagmaDNN | ||
run: | | ||
cd build | ||
make -j8 | ||
# Build Tests | ||
- name: Build Tests | ||
run: | | ||
cd build | ||
cmake .. -DMAGMADNN_BUILD_TESTS=TRUE | ||
make -j8 | ||
# Run Tests | ||
- name: Run Tests | ||
run: | | ||
cd build | ||
ctest | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: DoozyX/[email protected] | ||
with: | ||
source: './src ./include' | ||
exclude: '' | ||
extensions: 'h,cpp' | ||
clangFormatVersion: 9 | ||
style: file | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#pragma once | ||
|
||
#include <string> | ||
#include <cstring> | ||
#include <iostream> | ||
|
||
namespace magmadnn { | ||
|
||
class Arguments { | ||
public: | ||
Arguments(): | ||
enable_shortcut(true), | ||
learning_rate(0) | ||
{} | ||
|
||
int parse(std::string const& context, int argc, char** argv) { | ||
|
||
int ret = 0; | ||
|
||
std::string help = | ||
"Usage: " + context + " [options]\n" | ||
R"( | ||
Options: | ||
--disable-shorcut Disable shorcut in residual layers | ||
)"; | ||
|
||
|
||
|
||
for( int i = 1; i < argc; ++i ) { | ||
|
||
if ( !strcmp("--help", argv[i]) ) { | ||
|
||
std::cout << help; | ||
return 1; | ||
} | ||
|
||
// Resnet | ||
else if ( !strcmp("--disable-shortcut", argv[i])) { | ||
enable_shortcut = false; | ||
std::cout << "Resnet: disable shortcuts" << std::endl; | ||
} | ||
|
||
// SGD | ||
else if ( !strcmp("--learning-rate", argv[i]) && i+1 < argc ) { | ||
learning_rate = std::stod( argv[++i] ); | ||
std::cout << "SGD: Learning rate set to " << learning_rate << std::endl; | ||
} | ||
|
||
} | ||
|
||
return ret; | ||
} | ||
|
||
public: | ||
|
||
// Resnet | ||
|
||
// Enable shorcut for residual layers. If set to `false`, simply | ||
// implements plain convolutional networks. | ||
bool enable_shortcut; | ||
|
||
// SGD | ||
double learning_rate; | ||
}; | ||
|
||
} // End of namespace magmadnn |
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,8 +1,11 @@ | ||
magmadnn_add_example(alexnet.cpp) | ||
#magmadnn_add_example(alexnet_imagenet2012.cpp) | ||
magmadnn_add_example(cifar10_interactive.cpp) | ||
magmadnn_add_example(cnn_2d.cpp) | ||
magmadnn_add_example(lenet5.cpp) | ||
magmadnn_add_example(mnist_interactive.cpp) | ||
magmadnn_add_example(resnet.cpp) | ||
magmadnn_add_example(resnet_cifar10.cpp) | ||
magmadnn_add_example(simple_network.cpp) | ||
magmadnn_add_example(tensor_math.cpp) | ||
magmadnn_add_example(vgg16.cpp) |
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
Oops, something went wrong.