Skip to content
Snippets Groups Projects
Commit cd66331b authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Merge branch 'main' into padding

parents a0b4a87d f6d894c1
No related branches found
No related tags found
No related merge requests found
...@@ -130,16 +130,26 @@ build:windows_python: ...@@ -130,16 +130,26 @@ build:windows_python:
stage: build stage: build
needs: [] needs: []
tags: 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: script:
- python3 -m pip install virtualenv - python -m pip install virtualenv
- virtualenv venv - virtualenv venv
- source venv/bin/activate - venv\Scripts\Activate.ps1
# Numpy dependancy for unit test # Numpy dependancy for unit test
- python3 -m pip install numpy - python -m pip install numpy
- export AIDGE_INSTALL=`pwd`/install - $env:AIDGE_INSTALL = "$pwd" + "install"
- python3 -m pip install . - python -m pip install .
artifacts: artifacts:
expire_in: 1 week expire_in: 1 week
paths: paths:
......
...@@ -191,7 +191,7 @@ inline std::shared_ptr<Node> Conv(DimSize_t in_channels, ...@@ -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); 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(append(kernel_dims, in_channels), out_channels), "w");
addProducer(conv, 1, append(out_channels, append(in_channels, kernel_dims)), "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; return conv;
} }
......
...@@ -163,8 +163,8 @@ public: ...@@ -163,8 +163,8 @@ public:
inline std::shared_ptr<Node> FC(DimSize_t out_channels, bool noBias = false, const std::string& name = "") { 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 // 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); auto fc = std::make_shared<Node>(std::make_shared<FC_Op>(out_channels, noBias), name);
addProducer(fc, 1, {out_channels, 1}, "w"); addProducer(fc, 1, std::array<DimSize_t, 2>({out_channels, 1}), "w");
addProducer(fc, 2, {(noBias ? 0 : out_channels)}, "b"); // already sets bias dims addProducer(fc, 2, (noBias ? std::array<DimSize_t, 1>({0}) : std::array<DimSize_t, 1>({out_channels})), "b"); // already sets bias dims
return fc; return fc;
} }
} // namespace Aidge } // namespace Aidge
......
...@@ -153,7 +153,7 @@ public: ...@@ -153,7 +153,7 @@ public:
inline std::shared_ptr<Node> MatMul(DimSize_t out_channels, const std::string& name = "") { inline std::shared_ptr<Node> MatMul(DimSize_t out_channels, const std::string& name = "") {
// FIXME: properly handle default w initialization in every cases // FIXME: properly handle default w initialization in every cases
auto matmul = std::make_shared<Node>(std::make_shared<MatMul_Op>(out_channels), name); 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; return matmul;
} }
} // namespace Aidge } // namespace Aidge
......
...@@ -70,8 +70,8 @@ class CMakeBuild(build_ext): ...@@ -70,8 +70,8 @@ class CMakeBuild(build_ext):
self.spawn(['cmake', str(cwd), param_py, '-DTEST=OFF', f'-DCMAKE_INSTALL_PREFIX:PATH={install_path}']) self.spawn(['cmake', str(cwd), param_py, '-DTEST=OFF', f'-DCMAKE_INSTALL_PREFIX:PATH={install_path}'])
if not self.dry_run: if not self.dry_run:
self.spawn(['cmake', '--build', '.', '-j', max_jobs]) self.spawn(['cmake', '--build', '.', '--config', 'Debug', '-j', max_jobs])
self.spawn(['cmake', '--install', '.']) self.spawn(['cmake', '--install', '.', '--config', 'Debug'])
os.chdir(str(cwd)) os.chdir(str(cwd))
aidge_package = build_lib / (get_project_name()) aidge_package = build_lib / (get_project_name())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment