-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
2,656 additions
and
367 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,70 @@ | ||
name: Yateto CI | ||
|
||
on: push | ||
|
||
jobs: | ||
general: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ravilmobile/yateto-env:latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install Yateto | ||
run: | | ||
pip3 install -e . | ||
- name: Python Tests | ||
run: | | ||
python3 -m unittest tests/internals/*.py | ||
- name: Interface Tests | ||
run: | | ||
. /etc/profile.d/z10_spack_environment.sh && . /etc/profile.d/z20_additional_env.sh | ||
cd ./tests/interface | ||
for build_type in Debug Release; do | ||
mkdir -p ./build-${build_type} && cd ./build-${build_type} | ||
cmake .. -DCMAKE_BUILD_TYPE=${build_type} | ||
make | ||
make test | ||
cd .. | ||
done | ||
codegen: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ravilmobile/yateto-env:latest | ||
env: | ||
CTEST_OUTPUT_ON_FAILURE: 1 | ||
strategy: | ||
matrix: | ||
generator: [Eigen, LIBXSMM, LIBXSMM_JIT, OpenBLAS] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install Yateto | ||
run: | | ||
pip3 install -e . | ||
- name: Codegen Tests | ||
run: | | ||
. /etc/profile.d/z10_spack_environment.sh && . /etc/profile.d/z20_additional_env.sh | ||
cd ./tests/code-gen | ||
for example in matmul minimal; do | ||
for build_type in Debug Release; do | ||
for precision in single double; do | ||
echo " ====== Test Config: ======" | ||
echo " Build: ${build_type}" | ||
echo " Precision: ${precision}" | ||
echo " Example: ${example}" | ||
echo "===========================" | ||
mkdir -p ./build-${example}-${build_type}-${precision} | ||
cd ./build-${example}-${build_type}-${precision} | ||
cmake .. -DEXAMPLES=${example} -DCMAKE_BUILD_TYPE=${build_type} -DPRECISION=${precision} -DVARIANT=${{ matrix.generator }} -DARCH=snb | ||
make | ||
make test | ||
cd .. | ||
done | ||
done | ||
done |
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,31 @@ | ||
#ifndef YATETO_MISC_H_ | ||
#define YATETO_MISC_H_ | ||
|
||
namespace yateto { | ||
|
||
template<typename KernelType> | ||
auto getMaxTmpMemRequired(KernelType& krnl) { | ||
return KernelType::TmpMaxMemRequiredInBytes; | ||
} | ||
|
||
template<typename KernelType, typename... OtherKernelTypes> | ||
auto getMaxTmpMemRequired(KernelType& krnl, | ||
OtherKernelTypes&... otherKrnls) { | ||
auto currentTmpMem = KernelType::TmpMaxMemRequiredInBytes; | ||
auto otherTmpMem = getMaxTmpMemRequired(otherKrnls...); | ||
return (currentTmpMem > otherTmpMem) ? currentTmpMem : otherTmpMem; | ||
} | ||
|
||
template <typename Tensor, int Dim> | ||
constexpr size_t dimSize() noexcept { | ||
return Tensor::Stop[Dim] - Tensor::Start[Dim]; | ||
} | ||
|
||
template <typename Tensor> | ||
constexpr size_t leadDim() noexcept { | ||
return dimSize<Tensor, 0>(); | ||
} | ||
|
||
} // yateto | ||
|
||
#endif // YATETO_MISC_H_ |
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
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.