Skip to content

Commit

Permalink
Merge pull request #201 from wangli69087/memory_leak_detection
Browse files Browse the repository at this point in the history
Add check memory leak for windows
  • Loading branch information
fujunwei authored Apr 19, 2022
2 parents e0bc84d + 0ccf9c2 commit 7336caf
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/memory_leak_dml_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Check memory leak for DirectML backend (Windows)

on: [push, pull_request]

jobs:

job:

runs-on: windows-2019

steps:
- name: Git config
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Install depot_tools
shell: cmd
run: |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git ..\depot_tools
set "PATH=%CD%\..\depot_tools;%PATH%"
gclient
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: '3.x'

- uses: actions/checkout@v2
with:
path: update
fetch-depth: 0

- name: Sync latest code
shell: cmd
run: |
set "PATH=%CD%\..\depot_tools;%PATH%"
set "DEPOT_TOOLS_WIN_TOOLCHAIN=0"
cd update
copy scripts\standalone.gclient .gclient
gclient sync
- name: Generate project for update branch
shell: cmd
run: |
set "PATH=%CD%\..\depot_tools;%PATH%"
set "DEPOT_TOOLS_WIN_TOOLCHAIN=0"
cd update
gn gen out\Debug --args="webnn_enable_dml=true is_debug=true"
- name: Build for update branch
shell: cmd
run: |
set "PATH=%CD%\..\depot_tools;%PATH%"
set "DEPOT_TOOLS_WIN_TOOLCHAIN=0"
cd update
ninja -C out\Debug
- name: Check memory leak for update branch
shell: cmd
run: |
cd update
echo "Run End2End Tests..."
out\Debug\webnn_end2end_tests.exe --gtest_filter=-GemmTests.ScalarBias:Pool2dTests.MaxPool2dDilationsDefault:Pool2dTests.MaxPool2dDilationsNhwc:Pool2dTests.*Pool2dAutoPadExplicitOutputSizes4x4Nhwc:Pool2dTests.*Pool2dAutoPadExplicitRoundingTypeCeilNhwc > update_end2endtests.txt
findstr /s /n "Detected memory leaks!" update_end2endtests.txt && python -c "raise Exception('Detected memory leaks!')"

0 comments on commit 7336caf

Please sign in to comment.