Skip to content
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

WIP: Features/gsoc21/kannav #135

Draft
wants to merge 40 commits into
base: features/subtensor
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
db29cdf
Features/tensor refactor (#115)
bassoy May 24, 2021
a58a362
rebasing subtensor.
May 24, 2021
bd7a7ad
added addtional subtensor test.
Jun 4, 2020
881243a
access functions for tensor and subtensor access added.
Jun 19, 2020
03e7fd6
stride creation changed.
Jul 6, 2020
4bbbcc4
qtcreator pri file adjusted.
May 24, 2021
2849086
fixing tesor-vector multiplication for subtensor.
May 28, 2021
07a9cf5
product function for tensor-times-vector improved.
Jun 4, 2021
bd0f533
experimental: initial subtensor_engine<tensor_type>
kannavkm Jun 16, 2021
74acfee
add subtensor implementation
kannavkm Jul 30, 2021
5284adb
add Memeber functions
kannavkm Aug 2, 2021
e948da0
Decoupled span from tensor, negative span
kannavkm Aug 8, 2021
dc5c904
Fix bugs #51 #52
kannavkm Aug 15, 2021
3e6699c
Revert span to original
kannavkm Aug 16, 2021
1f958ae
WIP: Add support for static rank tensors
kannavkm Aug 17, 2021
d75b1e8
Improve examples and bug fixes
kannavkm Aug 19, 2021
02d64ee
Minor fixes
kannavkm Aug 19, 2021
dd83aea
subtensor tensor expresssion
kannavkm Aug 19, 2021
4fafcc8
Minor Fixes
kannavkm Aug 19, 2021
027c3ff
Minor Fixes
kannavkm Aug 19, 2021
12d996e
Add += operator
kannavkm Aug 19, 2021
e03c2a9
WIP: static rank subtensor
kannavkm Aug 19, 2021
62d241f
Minor Fixes
kannavkm Aug 19, 2021
a892f6d
Minor fixes
kannavkm Aug 20, 2021
faf1acc
Fix indexing
kannavkm Aug 20, 2021
22eed7c
Improve example
kannavkm Aug 20, 2021
517e199
fix ostream operator
kannavkm Aug 20, 2021
e33255e
Improve examples
kannavkm Aug 20, 2021
aca6b23
WIP: static_rank_subtensor
kannavkm Aug 20, 2021
6a99362
subtensor static rank complete
kannavkm Aug 21, 2021
813362b
fix outer product for subtensors
kannavkm Aug 21, 2021
b515bb4
fix failing tests
kannavkm Aug 21, 2021
b96fe1b
WIP: Add tests for subtensor
kannavkm Aug 22, 2021
740fd93
Fixed subtensor of subtensor creation
kannavkm Aug 22, 2021
e013495
subtensor expression eval
kannavkm Aug 23, 2021
7ae89d3
Add tests for subtensor
kannavkm Aug 23, 2021
0f7538a
Prepare branch for PR
kannavkm Aug 23, 2021
6232c50
Fix failing tests
kannavkm Aug 23, 2021
df2c864
fix failing clang-tidy checks
kannavkm Aug 30, 2021
c442b92
fix more clang-tidy warnings
kannavkm Aug 30, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 0 additions & 74 deletions .appveyor.yml

This file was deleted.

8 changes: 6 additions & 2 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
---
Checks: '-*,modernize-*,cppcoreguidelines-*,openmp-*,bugprone-*,performance-*,portability-*,readability-*,-modernize-use-trailing-return-type,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-readability-uppercase-literal-suffix,-readability-braces-around-statements'
WarningsAsErrors: '-*,modernize-*,cppcoreguidelines-*,openmp-*,bugprone-*,performance-*,portability-*,readability-*,-modernize-use-trailing-return-type,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-readability-uppercase-literal-suffix,-readability-braces-around-statements'
Checks: '-*,clang-*,bugprone-*,cppcoreguidelines-*,google-*,hicpp-*,modernize-*,performance-*,readability-*,portability-*,
-modernize-use-trailing-return-type, -readability-uppercase-literal-suffix, -readability-braces-around-statements, -hicpp-uppercase-literal-suffix, -hicpp-braces-around-statements, -hicpp-no-array-decay, -cppcoreguidelines-pro-bounds-constant-array-index, -cppcoreguidelines-pro-bounds-pointer-arithmetic, -cppcoreguidelines-pro-bounds-array-to-pointer-decay, -readability-avoid-const-params-in-decls, -google-readability-braces-around-statements,-google-explicit-constructor,-hicpp-vararg,-cppcoreguidelines-pro-type-vararg, -cppcoreguidelines-avoid-non-const-global-variables, -google-readability-todo, -cppcoreguidelines-pro-type-member-init, -hicpp-member-init, -cppcoreguidelines-special-member-functions, -hicpp-special-member-functions'
HeaderFilterRegex: 'boost\/numeric\/ublas\/tensor\/.*'
AnalyzeTemporaryDtors: false
FormatStyle: file
User: ublas-developers
CheckOptions:
- key: modernize-use-nullptr.NullMacros
value: 'NULL'
- key: readability-magic-numbers.IgnoredIntegerValues
value: '1;2;3;4;5;6;7;8;9;'
- key: cppcoreguidelines-avoid-magic-numbers.IgnoredIntegerValues
value: '1;2;3;4;5;6;7;8;9;'
...
75 changes: 0 additions & 75 deletions .github/workflows/address_san.yml

This file was deleted.

41 changes: 20 additions & 21 deletions .github/workflows/apple_clang.yml → .github/workflows/apple.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Copyright (c) 2020 Mohammad Ashar Khan
# Copyright (c) 2021 Cem Bassoy
# Distributed under Boost Software License, Version 1.0
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)

name: Apple Clang
name: "Apple MacOS"

on:
push:
Expand All @@ -15,24 +16,26 @@ on:
- 'doc/**'
jobs:
build:
name: "Darwin 11.0 -std=c++${{matrix.cxxstd}}"
runs-on: macos-latest
name: "MacOS 10.15 clang -std=c++${{matrix.cxxstd}}"
runs-on: macos-10.15
strategy:
fail-fast: false
fail-fast: true
matrix:
cxxstd: [11, 17, 2a]
cxxstd: [2a]

steps:
- uses: actions/checkout@v2

- name: Prepare BOOST_ROOT
- name: Git Clone Boost.uBlas
run: |
cd ${GITHUB_WORKSPACE}
cd ..

git clone -b master --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root

echo "BOOST_ROOT=${PWD}" >> ${GITHUB_ENV}
echo $BOOST_ROOT

git submodule update --init --depth=1 --jobs 8 tools/build
git submodule update --init --depth=1 --jobs 8 libs/config
git submodule update --init --depth=1 --jobs 8 tools/boostdep
Expand All @@ -41,33 +44,29 @@ jobs:
cp -rp ${GITHUB_WORKSPACE}/. libs/numeric/ublas
python tools/boostdep/depinst/depinst.py -g " --depth=1" -I benchmarks numeric/ublas

./bootstrap.sh
./b2 -j 8 headers

#echo ::set-env name=BOOST_ROOT::${PWD}
echo "BOOST_ROOT=${PWD}" >> ${GITHUB_ENV}

- name: Prepare Build
- name: Bootstrap and Compile Boost.uBlas
run: |
echo $BOOST_ROOT
cd $BOOST_ROOT

echo "using clang : : clang++ ;" >> ~/user-config.jam;

./bootstrap.sh
./b2 -j8 headers
echo "using clang : : $(brew --prefix llvm)/bin/clang++ ;" >> ~/user-config.jam;


- name: Test Benchmarks
run: |
cd $BOOST_ROOT
cd libs/numeric/ublas
$BOOST_ROOT/b2 -j 4 benchmarks toolset=clang cxxstd=${{matrix.cxxstd}}
$BOOST_ROOT/b2 -j8 benchmarks cxxstd=${{matrix.cxxstd}}

- name: Test Tensor Examples
run: |
cd $BOOST_ROOT
cd libs/numeric/ublas
$BOOST_ROOT/b2 -j 4 examples/tensor toolset=clang cxxstd=${{matrix.cxxstd}}
$BOOST_ROOT/b2 -j8 examples/tensor cxxstd=${{matrix.cxxstd}}

- name: Test Tensor
run: |
cd $BOOST_ROOT
cd libs/numeric/ublas
$BOOST_ROOT/b2 -j 4 test/tensor toolset=clang cxxstd=${{matrix.cxxstd}}
$BOOST_ROOT/b2 -j8 test/tensor cxxstd=${{matrix.cxxstd}}

Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
# Copyright (c) 2020 Mohammad Ashar Khan
# Copyright (c) 2021 Cem Bassoy
# Distributed under Boost Software License, Version 1.0
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)

name: Clang tidy Review

on: [pull_request]

name: "Static Analysis"

on:
push:
paths-ignore:
- '**.md'
- 'doc/**'
pull_request:
paths-ignore:
- '**.md'
- 'doc/**'
jobs:
check:
name: Clang tidy Review
name: Linux Clang-Tidy
runs-on: ubuntu-20.04
if: github.event.pull_request.head.repo.full_name == github.repository
steps:
- uses: actions/checkout@v2
- name: "Install dependencies"
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key 2>/dev/null | sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/focal llvm-toolchain-focal-10 main' -y
sudo apt-get update -q
sudo apt-get install -y clang-10 clang-tidy-10
- uses: actions/checkout@v2

- name: Install Clang 11
run: sudo apt-get update && sudo apt-get install -y clang-11 clang-tidy-11

- name: "Install Boost from Source"
- name: "Install Boost from Source"
run: |
cd ..
git clone --depth 1 https://github.com/boostorg/boost.git --recursive --shallow-submodules
Expand All @@ -29,19 +33,20 @@ jobs:
./b2 headers
sudo cp -r -L boost /usr/include
rm -rf boost

- name: "Run Clang-Tidy"
run: clang-tidy-11 examples/tensor/*.cpp test/tensor/*.cpp -- -Iinclude -std=c++20 > reports.txt

- name: "Print Clang-Tidy Report"
run: cat reports.txt

- uses: actions/setup-python@v2

- name: "Run clang-tidy check"
run: |
clang-tidy-10 examples/tensor/*.cpp -- -Iinclude -std=c++17 > reports.txt


- name: "Post review comments"
if: always()
if: github.event.pull_request.head.repo.full_name == github.repository
run: |
pip3 install 'unidiff~=0.6.0' --force-reinstall
pip3 install 'PyGithub~=1.51' --force-reinstall
pip3 install 'requests~=2.23' --force-reinstall

python ./.ci/post_review.py --repository ${{ github.repository }} --token ${{ github.token}} --pr ${{ github.event.pull_request.number }} --path reports.txt

python ./.ci/post_review.py --repository ${{ github.repository }} --token ${{ github.token}} --pr ${{ github.event.pull_request.number }} --path reports.txt

47 changes: 0 additions & 47 deletions .github/workflows/clangtidy_check.yml

This file was deleted.

Loading