Skip to content

Commit

Permalink
Improve Eigen Module API and Rename Modules to make more Sense (#33) (#…
Browse files Browse the repository at this point in the history
…35)

* Improve Eigen Module API and Rename Modules to make more Sense (#33)

* overload binary elementary operators with constants

* overload operator for c++

* overload operator for python

* rename ade and ead to make more sense

* rename pll and move modl and eqns out of rocnnet

* rename modl to avoid confusing with model directory

* cover layr module

* update rocnnet includes

* replace modl with layr for rocnnet builds and doxyfile

* resolve remaining renaming issues

* fix softmax test

* reduce number of valgrind tests to reduce test time

* make tf.nn.softmax axis=-2 safer

* lower matrix max value to ensure 2-d is always generated

* convert remaining ead occurrences to eteq
  • Loading branch information
raggledodo committed Sep 27, 2019
1 parent ac63b42 commit 23b06eb
Show file tree
Hide file tree
Showing 200 changed files with 8,099 additions and 6,749 deletions.
8 changes: 6 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ package(
filegroup(
name = "srcs",
srcs = [
"//ade:srcs",
"//ccur:srcs",
"//dbg:srcs",
"//ead:srcs",
"//eteq:srcs",
"//layr:srcs",
"//opt:srcs",
"//pbm:srcs",
"//perf:srcs",
"//tag:srcs",
"//teq:srcs",
"//rocnnet:srcs",
"BUILD.bazel",
],
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = README.md ade dbg ead opt pbm tag
INPUT = README.md teq dbg eteq opt pbm tag ccur layr

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down
71 changes: 44 additions & 27 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@ COVERAGE_INFO_FILE := bazel-out/_coverage/_coverage_report.dat

COVERAGE_IGNORE := 'external/*' '**/test/*' 'testutil/*' '**/genfiles/*' 'dbg/*'

CCOVER := bazel coverage --config asan --action_env="ASAN_OPTIONS=detect_leaks=0" --config gtest --config cc_coverage --define EAD_CFG=MIN
CCOVER := bazel coverage --config asan --action_env="ASAN_OPTIONS=detect_leaks=0" --config gtest --config cc_coverage --define ETEQ_CFG=MIN

ADE_TEST := //ade:test
CCUR_TEST := //ccur:test

TAG_TEST := //tag:test
ETEQ_CTEST := //eteq:ctest

PBM_TEST := //pbm:test
LAYR_TEST := //layr:test

OPT_TEST := //opt/...

EAD_CTEST := //ead:ctest
PBM_TEST := //pbm:test

TAG_TEST := //tag:test

TEQ_TEST := //teq:test

CC := gcc

Expand All @@ -26,34 +30,42 @@ print_vars:
rocnnet_py_build:
bazel build --config $(CC)_eigen_optimal //rocnnet:rocnnet_py

rocnnet_py_export: bazel-bin/rocnnet/rocnnet.so bazel-bin/ead/tenncor.so bazel-bin/ead/ead.so
rocnnet_py_export: bazel-bin/rocnnet/rocnnet.so bazel-bin/eteq/tenncor.so bazel-bin/eteq/eteq.so
cp -f bazel-bin/rocnnet/rocnnet.so rocnnet/notebooks/rocnnet
cp -f bazel-bin/ead/*.so rocnnet/notebooks/ead
cp -f bazel-bin/eteq/*.so rocnnet/notebooks/eteq


coverage:
$(CCOVER) $(ADE_TEST) $(TAG_TEST) $(PBM_TEST) $(OPT_TEST) $(EAD_CTEST)
$(CCOVER) $(TEQ_TEST) $(TAG_TEST) $(PBM_TEST) $(OPT_TEST) $(ETEQ_CTEST) $(CCUR_TEST) $(LAYR_TEST)
lcov --remove $(COVERAGE_INFO_FILE) -o coverage.info

cover_ade:
$(CCOVER) $(ADE_TEST)
lcov --remove $(COVERAGE_INFO_FILE) -o coverage.info
cover_ccur:
$(CCOVER) $(CCUR_TEST)
lcov --remove $(COVERAGE_INFO_FILE) 'teq/*' 'tag/*' 'opt/*' 'eteq/*' -o coverage.info

cover_tag:
$(CCOVER) $(TAG_TEST)
lcov --remove $(COVERAGE_INFO_FILE) 'ade/*' -o coverage.info
cover_eteq:
$(CCOVER) $(ETEQ_CTEST)
lcov --remove $(COVERAGE_INFO_FILE) 'teq/*' 'tag/*' 'opt/*' -o coverage.info

cover_pbm:
$(CCOVER) $(PBM_TEST)
lcov --remove $(COVERAGE_INFO_FILE) 'ade/*' -o coverage.info
cover_layr:
$(CCOVER) $(LAYR_TEST)
lcov --remove $(COVERAGE_INFO_FILE) 'teq/*' 'tag/*' 'opt/*' 'eteq/*' -o coverage.info

cover_opt:
$(CCOVER) $(OPT_TEST)
lcov --remove $(COVERAGE_INFO_FILE) 'ade/*' 'tag/*' 'ead/*' -o coverage.info
lcov --remove $(COVERAGE_INFO_FILE) 'teq/*' 'tag/*' 'eteq/*' -o coverage.info

cover_ead:
$(CCOVER) $(EAD_CTEST)
lcov --remove $(COVERAGE_INFO_FILE) 'ade/*' 'tag/*' 'opt/*' -o coverage.info
cover_pbm:
$(CCOVER) $(PBM_TEST)
lcov --remove $(COVERAGE_INFO_FILE) 'teq/*' -o coverage.info

cover_tag:
$(CCOVER) $(TAG_TEST)
lcov --remove $(COVERAGE_INFO_FILE) 'teq/*' -o coverage.info

cover_teq:
$(CCOVER) $(TEQ_TEST)
lcov --remove $(COVERAGE_INFO_FILE) -o coverage.info


# optimized comparisons
Expand All @@ -74,19 +86,24 @@ cov_clean: coverage.info
cov_genhtml: coverage.info
genhtml -o html coverage.info


lcov: coverage cov_clean

lcov_ade: cover_ade cov_clean
lcov_ccur: cover_ccur cov_clean

lcov_tag: cover_tag cov_clean
lcov_eteq: cover_eteq cov_clean

lcov_pbm: cover_pbm cov_clean
lcov_layr: cover_layr cov_clean

lcov_opt: cover_opt cov_clean

lcov_ead: cover_ead cov_clean
lcov_pbm: cover_pbm cov_clean

lcov_tag: cover_tag cov_clean

lcov_teq: cover_teq cov_clean

.PHONY: print_vars rocnnet_py_build rocnnet_py_export
.PHONY: coverage cover_ade cover_tag cover_tag cover_pbm cover_opt cover_ead
.PHONY: coverage cover_ccur cover_eteq cover_layr cover_opt cover_pbm cover_tag cover_teq
.PHONY: compare_matmul compare_mlp compare_mlp_grad cov_clean cov_genhtml
.PHONY: lcov lcov_ade lcov_tag lcov_pbm lcov_opt lcov_ead brief_lcov
.PHONY: lcov lcov_ccur lcov_eteq lcov_layr lcov_opt lcov_pbm lcov_tag lcov_teq
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,31 @@ High-level diagram available: https://drive.google.com/file/d/1PrsFa7Duj4Whlu_m0

## Components

- [ADE (Automatic Differentiation Engine)](ade/README_ADE.md)
- [TEQ (Automatic Differentiation Engine)](teq/README_ADE.md)

This module supplies syntax tree for equation and generates derivative.
Constraints to the equation is limited to each tensor's shape.

- [DBG (Debug)](ead/README_DBG.md)
- [DBG (Debug)](eteq/README_DBG.md)

This module is contains debug libraries for ADE Graphs.
This module is contains debug libraries for TEQ Graphs.

- [EAD (Eigen ADE Operators)](ead/README_EAD.md)
- [ETEQ (Eigen TEQ Operators)](eteq/README_EAD.md)

This module is implements basic operations for Tenncor's ADE Tensor objects generated through pybinder.
Additionally, ead also defines data format and (de)serialization methods required by PBM.
This module is implements basic operations for Tenncor's TEQ Tensor objects generated through pybinder.
Additionally, ETEQ also defines data format and (de)serialization methods required by PBM.

- [OPT (Optimizer)](opt/README_OPT.md)

This module specifies graph optimization through ADE's visitor pattern.
This module specifies graph optimization through TEQ's visitor pattern.

- [PBM (Protobuf Marshaller)](pbm/README_PBM.md)

This module marshals any ADE graph, but requires data serialization functors when saving and loading.
This module marshals any TEQ graph, but requires data serialization functors when saving and loading.

- [TAG (Tagger)](tag/README_TAG.md)

This module tags ADE tensors with labels.
This module tags TEQ tensors with labels.

## Tools and utility

Expand Down
11 changes: 0 additions & 11 deletions ade/ade.hpp

This file was deleted.

146 changes: 0 additions & 146 deletions ade/bm/benchmark.cpp

This file was deleted.

Loading

0 comments on commit 23b06eb

Please sign in to comment.