diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f41982..fd68cd8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.7) +cmake_minimum_required(VERSION 3.6) project(cuBERT VERSION 0.0.4 LANGUAGES C CXX) set(CMAKE_CXX_STANDARD 11) diff --git a/devel-py.Dockerfile b/devel-py.Dockerfile new file mode 100644 index 0000000..67a7900 --- /dev/null +++ b/devel-py.Dockerfile @@ -0,0 +1,21 @@ +FROM quay.io/pypa/manylinux2010_x86_64 + +WORKDIR /usr/src/cuBERT +COPY . . + +RUN yum -y install \ + cmake3 \ + && \ + yum -y clean all && \ + rm -rf /var/cache/yum/* + +RUN rm -rf build && mkdir build && cd build && \ + cmake3 -DCMAKE_BUILD_TYPE=Release -DcuBERT_ENABLE_MKL_SUPPORT=ON .. && \ + make + +RUN /opt/python/cp36-cp36m/bin/pip install Cython numpy +RUN /opt/python/cp27-cp27m/bin/pip install Cython numpy + +RUN cd python && \ + /opt/python/cp36-cp36m/bin/python setup.py bdist_wheel && \ + /opt/python/cp27-cp27m/bin/python setup.py bdist_wheel diff --git a/test/cuBERT/BertMTest.cpp b/test/cuBERT/BertMTest.cpp index 2d1b562..adcfa8d 100644 --- a/test/cuBERT/BertMTest.cpp +++ b/test/cuBERT/BertMTest.cpp @@ -1,5 +1,3 @@ -#include "gtest/gtest.h" - #include "common_test.h" #include "cuBERT/BertM.h" using namespace cuBERT; diff --git a/test/cuBERT/BertTest.cpp b/test/cuBERT/BertTest.cpp index 8f4805d..e925bf3 100644 --- a/test/cuBERT/BertTest.cpp +++ b/test/cuBERT/BertTest.cpp @@ -1,4 +1,3 @@ -#include "gtest/gtest.h" #include #include "common_test.h" diff --git a/test/cuBERT/common_test.cpp b/test/cuBERT/common_test.cpp index c0849ce..d8d6088 100644 --- a/test/cuBERT/common_test.cpp +++ b/test/cuBERT/common_test.cpp @@ -1,5 +1,3 @@ -#include "gtest/gtest.h" - #include "common_test.h" TEST_F(CommonTest, memcpy) { diff --git a/test/cuBERT/common_test.h b/test/cuBERT/common_test.h index c94e27a..3d38ee0 100644 --- a/test/cuBERT/common_test.h +++ b/test/cuBERT/common_test.h @@ -1,12 +1,13 @@ #ifndef CUBERT_COMMON_TEST_H #define CUBERT_COMMON_TEST_H -#include "gtest/gtest.h" #include #include #include "cuBERT/common.h" +#include "gtest/gtest.h" + class CommonTest : public ::testing::Test { protected: void SetUp() override { diff --git a/test/cuBERT/op/DenseTest.cpp b/test/cuBERT/op/DenseTest.cpp index 5ccb88e..0e51dbc 100644 --- a/test/cuBERT/op/DenseTest.cpp +++ b/test/cuBERT/op/DenseTest.cpp @@ -1,5 +1,3 @@ -#include "gtest/gtest.h" - #include "../common_test.h" #include "cuBERT/op/Dense.h" using namespace cuBERT; diff --git a/test/cuBERT/op/EmbeddingTest.cpp b/test/cuBERT/op/EmbeddingTest.cpp index 1460f7c..55bade4 100644 --- a/test/cuBERT/op/EmbeddingTest.cpp +++ b/test/cuBERT/op/EmbeddingTest.cpp @@ -1,5 +1,3 @@ -#include "gtest/gtest.h" - #include "../common_test.h" #include "cuBERT/op/Embedding.h" using namespace cuBERT; diff --git a/test/cuBERT/op/GELUTest.cpp b/test/cuBERT/op/GELUTest.cpp index 3028ae4..990f47a 100644 --- a/test/cuBERT/op/GELUTest.cpp +++ b/test/cuBERT/op/GELUTest.cpp @@ -1,4 +1,3 @@ -#include "gtest/gtest.h" #include #include "../common_test.h" diff --git a/test/cuBERT/op/LayerNormTest.cpp b/test/cuBERT/op/LayerNormTest.cpp index af91435..19e2bb6 100644 --- a/test/cuBERT/op/LayerNormTest.cpp +++ b/test/cuBERT/op/LayerNormTest.cpp @@ -1,4 +1,3 @@ -#include "gtest/gtest.h" #include #include "../common_test.h" diff --git a/test/cuBERT/op/SoftmaxTest.cpp b/test/cuBERT/op/SoftmaxTest.cpp index 72a069d..5a8645c 100644 --- a/test/cuBERT/op/SoftmaxTest.cpp +++ b/test/cuBERT/op/SoftmaxTest.cpp @@ -1,5 +1,3 @@ -#include "gtest/gtest.h" - #include "../common_test.h" #include "cuBERT/op/Softmax.h" using namespace cuBERT; diff --git a/test/cuBERT/op_att/AttentionMaskTest.cpp b/test/cuBERT/op_att/AttentionMaskTest.cpp index 4c49054..3407273 100644 --- a/test/cuBERT/op_att/AttentionMaskTest.cpp +++ b/test/cuBERT/op_att/AttentionMaskTest.cpp @@ -1,5 +1,3 @@ -#include "gtest/gtest.h" - #include "../common_test.h" #include "cuBERT/op_att/AttentionMask.h" using namespace cuBERT; diff --git a/test/cuBERT/op_att/AttentionSelfTest.cpp b/test/cuBERT/op_att/AttentionSelfTest.cpp index a2e8a43..b8c8db5 100644 --- a/test/cuBERT/op_att/AttentionSelfTest.cpp +++ b/test/cuBERT/op_att/AttentionSelfTest.cpp @@ -1,4 +1,3 @@ -#include "gtest/gtest.h" #include #include "../common_test.h" diff --git a/test/cuBERT/op_att/BatchMatMulTest.cpp b/test/cuBERT/op_att/BatchMatMulTest.cpp index 649e012..b6cb575 100644 --- a/test/cuBERT/op_att/BatchMatMulTest.cpp +++ b/test/cuBERT/op_att/BatchMatMulTest.cpp @@ -1,5 +1,3 @@ -#include "gtest/gtest.h" - #include "../common_test.h" #include "cuBERT/op_att/BatchMatMul.h" using namespace cuBERT; diff --git a/test/cuBERT/op_att/TransformerTest.cpp b/test/cuBERT/op_att/TransformerTest.cpp index cf4db48..6ba39e3 100644 --- a/test/cuBERT/op_att/TransformerTest.cpp +++ b/test/cuBERT/op_att/TransformerTest.cpp @@ -1,4 +1,3 @@ -#include "gtest/gtest.h" #include #include "../common_test.h" diff --git a/test/cuBERT/op_bert/BertEmbeddingsTest.cpp b/test/cuBERT/op_bert/BertEmbeddingsTest.cpp index 0a691ef..3cddaf7 100644 --- a/test/cuBERT/op_bert/BertEmbeddingsTest.cpp +++ b/test/cuBERT/op_bert/BertEmbeddingsTest.cpp @@ -1,4 +1,3 @@ -#include "gtest/gtest.h" #include #include "../common_test.h" diff --git a/test/cuBERT/op_bert/BertPoolerTest.cpp b/test/cuBERT/op_bert/BertPoolerTest.cpp index 57e5965..9b4d4e7 100644 --- a/test/cuBERT/op_bert/BertPoolerTest.cpp +++ b/test/cuBERT/op_bert/BertPoolerTest.cpp @@ -1,4 +1,3 @@ -#include "gtest/gtest.h" #include #include "../common_test.h" diff --git a/test/cuBERT/op_out/AdditionalOutputLayerTest.cpp b/test/cuBERT/op_out/AdditionalOutputLayerTest.cpp index f5ff92b..3fe0361 100644 --- a/test/cuBERT/op_out/AdditionalOutputLayerTest.cpp +++ b/test/cuBERT/op_out/AdditionalOutputLayerTest.cpp @@ -1,5 +1,3 @@ -#include "gtest/gtest.h" - #include "../common_test.h" #include "cuBERT/op_out/AdditionalOutputLayer.h" using namespace cuBERT;