Skip to content

Commit

Permalink
Add memory leak detection at dml backend on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
wangli69087 committed Apr 6, 2022
1 parent 92fc40c commit a90024c
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/memory_leak_dml_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Check memory leak for DirectML backend (Windows)

on: [push, pull_request]

jobs:

job:

runs-on: windows-latest

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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
[![Node Binding (OpenVINO backend / Windows)](https://github.com/webmachinelearning/webnn-native/actions/workflows/build_test_node_openvino_windows.yml/badge.svg)](https://github.com/webmachinelearning/webnn-native/actions/workflows/build_test_node_openvino_windows.yml)
[![oneDNN backend (Linux)](https://github.com/webmachinelearning/webnn-native/actions/workflows/build_test_onednn_linux.yml/badge.svg)](https://github.com/webmachinelearning/webnn-native/actions/workflows/build_test_onednn_linux.yml)
[![oneDNN backend (Windows)](https://github.com/webmachinelearning/webnn-native/actions/workflows/build_test_onednn_windows.yml/badge.svg)](https://github.com/webmachinelearning/webnn-native/actions/workflows/build_test_onednn_windows.yml)
[![Check memory leak for DirectML backend (Windows)](https://github.com/BruceDai/webnn-native/actions/workflows/memory_leak_dml_windows.yml/badge.svg)](https://github.com/webmachinelearning/webnn-native/actions/workflows/memory_leak_dml_windows.yml)

# WebNN-native

Expand Down

0 comments on commit a90024c

Please sign in to comment.