diff --git a/.gitlab/ci/build.gitlab-ci.yml b/.gitlab/ci/build.gitlab-ci.yml index 62878a57d7f00d36eff92f95e5a2efff484e42df..6bfae0be1e31a89d27413677fa4cdc4612561333 100644 --- a/.gitlab/ci/build.gitlab-ci.yml +++ b/.gitlab/ci/build.gitlab-ci.yml @@ -130,16 +130,26 @@ build:windows_python: stage: build needs: [] tags: - - docker + - windows + image: buildtools + before_script: + # Install Chocolatey + - Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) + # Install dependencies + - choco install cmake.install --installargs '"ADD_CMAKE_TO_PATH=System"' -Y + - choco install git -Y + - choco install python -Y + # Update PATH + - $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") script: - - python3 -m pip install virtualenv + - python -m pip install virtualenv - virtualenv venv - - source venv/bin/activate + - venv\Scripts\Activate.ps1 # Numpy dependancy for unit test - - python3 -m pip install numpy - - export AIDGE_INSTALL=`pwd`/install - - python3 -m pip install . + - python -m pip install numpy + - $env:AIDGE_INSTALL = "$pwd" + "install" + - python -m pip install . artifacts: expire_in: 1 week paths: diff --git a/include/aidge/operator/Conv.hpp b/include/aidge/operator/Conv.hpp index d993879cb198581b31957c4d798717d7ed9ae5c3..c8e229cbb3815ae7bd24064e862dc407b327febd 100644 --- a/include/aidge/operator/Conv.hpp +++ b/include/aidge/operator/Conv.hpp @@ -191,7 +191,7 @@ inline std::shared_ptr<Node> Conv(DimSize_t in_channels, auto conv = std::make_shared<Node>(std::make_shared<Conv_Op<static_cast<DimIdx_t>(DIM)>>(in_channels, out_channels, kernel_dims, stride_dims, dilation_dims), name); // addProducer(conv, 1, append(append(kernel_dims, in_channels), out_channels), "w"); addProducer(conv, 1, append(out_channels, append(in_channels, kernel_dims)), "w"); - addProducer(conv, 2, {out_channels}, "b"); + addProducer(conv, 2, std::array<DimSize_t, 1>({out_channels}), "b"); return conv; } diff --git a/include/aidge/operator/FC.hpp b/include/aidge/operator/FC.hpp index 6f5b2a44f9a090fba599a3a92c4fc0a7d21e3ccb..8dea03ca0b7cd9ce7543fa35d082bc5164365b7b 100644 --- a/include/aidge/operator/FC.hpp +++ b/include/aidge/operator/FC.hpp @@ -163,8 +163,8 @@ public: inline std::shared_ptr<Node> FC(DimSize_t out_channels, bool noBias = false, const std::string& name = "") { // FIXME: properly handle default w&b initialization in every cases auto fc = std::make_shared<Node>(std::make_shared<FC_Op>(out_channels, noBias), name); - addProducer(fc, 1, {out_channels, 1}, "w"); - addProducer(fc, 2, {(noBias ? 0 : out_channels)}, "b"); // already sets bias dims + addProducer(fc, 1, std::array<DimSize_t, 2>({out_channels, 1}), "w"); + addProducer(fc, 2, (noBias ? std::array<DimSize_t, 1>({0}) : std::array<DimSize_t, 1>({out_channels})), "b"); // already sets bias dims return fc; } } // namespace Aidge diff --git a/include/aidge/operator/MatMul.hpp b/include/aidge/operator/MatMul.hpp index 4c15f8ce369dbbda6ae0268cf3fd6762ab642232..eec7072ff2739c80bb327f0e987e7d3712ba217e 100644 --- a/include/aidge/operator/MatMul.hpp +++ b/include/aidge/operator/MatMul.hpp @@ -153,7 +153,7 @@ public: inline std::shared_ptr<Node> MatMul(DimSize_t out_channels, const std::string& name = "") { // FIXME: properly handle default w initialization in every cases auto matmul = std::make_shared<Node>(std::make_shared<MatMul_Op>(out_channels), name); - addProducer(matmul, 1, {out_channels, 1}, "w"); + addProducer(matmul, 1, std::array<DimSize_t, 2>({out_channels, 1}), "w"); return matmul; } } // namespace Aidge diff --git a/setup.py b/setup.py index 4611ac78aad0436f663b1348d012bb3c3bd0054a..b88329e54feab78e39bd79be0a129030098e216a 100644 --- a/setup.py +++ b/setup.py @@ -70,8 +70,8 @@ class CMakeBuild(build_ext): self.spawn(['cmake', str(cwd), param_py, '-DTEST=OFF', f'-DCMAKE_INSTALL_PREFIX:PATH={install_path}']) if not self.dry_run: - self.spawn(['cmake', '--build', '.', '-j', max_jobs]) - self.spawn(['cmake', '--install', '.']) + self.spawn(['cmake', '--build', '.', '--config', 'Debug', '-j', max_jobs]) + self.spawn(['cmake', '--install', '.', '--config', 'Debug']) os.chdir(str(cwd)) aidge_package = build_lib / (get_project_name())