Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
7b92719
adds wheels
tvy-amd May 11, 2026
9ad3b63
removes the duplicate graphs
tvy-amd May 12, 2026
06f59e5
Adopt SKBUILD pattern for hipdnn-frontend wheel and revert dnn-benchm…
tvy-amd May 12, 2026
7d98bfc
Revert pyproject.toml to use wheel.packages for __init__.py
tvy-amd May 12, 2026
0567247
Clarify comment on target guards in python/CMakeLists.txt
tvy-amd May 12, 2026
462f978
Add smoke tests for hipDNN Python bindings wheel
tvy-amd May 12, 2026
5def8a0
Remove hipDNN Python bindings test (moved to TheRock)
tvy-amd May 12, 2026
fae98b8
Use find_package for nanobind, fall back to FetchContent
tvy-amd May 12, 2026
d0aae62
Use hipdnn_add_dependency for nanobind and tsl-robin-map in python bi…
tvy-amd May 13, 2026
b99478e
Align nanobind version in pyproject.toml with CMake (2.4.0)
tvy-amd May 13, 2026
db1940f
Fix clang-tidy errors in Python bindings
tvy-amd May 13, 2026
5ef2477
Fix remaining clang-tidy warnings in Python bindings
tvy-amd May 13, 2026
c7cf70b
Run clang-format on Python binding source files
tvy-amd May 13, 2026
f955995
Add python3-dev to clang-tidy CI for Python bindings
tvy-amd May 13, 2026
9ad8a4c
Fix clang-tidy errors in memory_bindings.cpp
tvy-amd May 13, 2026
12f58e4
Bump nanobind to 2.12.0 and tsl-robin-map to 1.4.1
tvy-amd May 14, 2026
612a014
changes default version for nanobind and robin-map
tvy-amd May 14, 2026
378cbd8
Fix clang-tidy errors in Python binding source files
tvy-amd May 14, 2026
f7aa3e7
Add missing string include for Windows build
tvy-amd May 14, 2026
eb991f4
Use Development.Module instead of full Development for Python bindings
tvy-amd May 14, 2026
3d0d08b
Fix standalone wheel build by including Dependencies.cmake and forwar…
tvy-amd May 14, 2026
d39ac72
Remove redundant version variables from pip wheel command
tvy-amd May 14, 2026
6c4894b
Add pytest test suite for Python bindings
tvy-amd May 14, 2026
545ad7c
Merge branch 'users/tvy/python_bindings' into users/tvy/python_bindin…
tvy-amd May 14, 2026
503ad67
Address review feedback: forward FetchContent source dirs and remove …
tvy-amd May 14, 2026
30c3da0
Forward hip_DIR to standalone wheel build to fix TheRock CI
tvy-amd May 15, 2026
841dd97
Forward HIP transitive dependencies to standalone wheel build
tvy-amd May 15, 2026
5b119db
Use VERSION parameter directly in nanobind and tsl-robin-map fetch fu…
tvy-amd May 15, 2026
9c71b96
Decouple Python wheel packaging from CMake build system
tvy-amd May 15, 2026
fcef882
Apply black formatting to Python wheel scripts
tvy-amd May 15, 2026
a4738c9
Remove unused HIPDNN_PREBUILT_SO env var from hatch build hook
tvy-amd May 15, 2026
bbed27a
Remove pyproject.toml and hatch_build.py
tvy-amd May 15, 2026
aac5a05
Only include __init__.py and .so in Python wheel
tvy-amd May 15, 2026
7c10484
Merge remote-tracking branch 'origin/users/tvy/python_bindings' into …
tvy-amd May 15, 2026
fb906e1
Clean up wheel assembly script and staging directory
tvy-amd May 15, 2026
be28b1a
Merge remote-tracking branch 'origin/users/tvy/python_bindings' into …
tvy-amd May 15, 2026
1cb3300
goes with hatch build
tvy-amd May 15, 2026
3719e2a
Install hatchling in CI and fix black formatting
tvy-amd May 19, 2026
494766e
Replace hatchling with setuptools for hipdnn-frontend wheel build
tvy-amd May 19, 2026
43c8f00
Fix trailing newline in .gitignore for pre-commit
tvy-amd May 19, 2026
8761fdd
Error when HIPDNN_EXT_DIR is not set instead of building broken wheel
tvy-amd May 19, 2026
cc3e3f7
Fix .gitignore trailing newline (take 2)
tvy-amd May 19, 2026
9952293
Remove standalone build guards from python CMakeLists.txt
tvy-amd May 19, 2026
b2bca98
Remove redundant find_package(hip) from python CMakeLists.txt
tvy-amd May 19, 2026
cc84fed
Remove redundant include dirs and hip::host from python CMakeLists.txt
tvy-amd May 19, 2026
2c4aada
Exclude samples and tests from hipdnn-frontend wheel
tvy-amd May 19, 2026
0bf9b09
Merge remote-tracking branch 'origin/users/tvy/python_bindings' into …
tvy-amd May 19, 2026
8598e96
Fix Python binding tests for updated API and pytest import rules
tvy-amd May 19, 2026
338948c
Add GitHub Actions workflow for Python binding tests
tvy-amd May 19, 2026
ba71d4e
Default Python bindings to OFF and enable explicitly in CI
tvy-amd May 19, 2026
b528596
Update TheRock hash and default python bindings to OFF
tvy-amd May 19, 2026
78659c3
Restore CI workflow files from develop
tvy-amd May 19, 2026
6dc9e92
Read nanobind extension from build dir instead of install prefix
tvy-amd May 19, 2026
c97e6e5
Restore workflow files from develop
tvy-amd May 19, 2026
8379b29
Merge branch 'develop' into users/tvy/python_bindings
tvy-amd May 19, 2026
2a9a5d3
Disable clang-format check in Python test CI workflow
tvy-amd May 19, 2026
4712622
Merge remote-tracking branch 'origin/users/tvy/python_bindings' into …
tvy-amd May 19, 2026
e75ddfc
Switch hipDNN python bindings from setuptools to scikit-build-core
tvy-amd May 20, 2026
5549804
Update Python bindings README for scikit-build-core
tvy-amd May 20, 2026
ddf98f1
Add cmake to python bindings build requirements
tvy-amd May 20, 2026
2221111
Address PR review feedback for python bindings packaging
tvy-amd May 20, 2026
6bc2aea
Guard project() and cmake settings behind SKBUILD in python CMakeLists
tvy-amd May 20, 2026
3a69eed
Use repo-standard ROCM_PATH detection pattern in python CMakeLists
tvy-amd May 20, 2026
f4f0e4b
Update Python bindings README for review feedback
tvy-amd May 20, 2026
6ef9fd8
Improve HIPDNN_BUILD_PYTHON_BINDINGS description in README
tvy-amd May 20, 2026
f80df5e
Merge branch 'develop' into users/tvy/python_bindings
tvy-amd May 21, 2026
cba633e
Merge branch 'users/tvy/python_bindings' of https://github.com/ROCm/r…
tvy-amd May 21, 2026
aeb90a5
Preload hipDNN backend library via rocm_sdk for wheel installs
tvy-amd May 21, 2026
e452c4e
Merge remote-tracking branch 'origin/users/tvy/python_bindings' into …
tvy-amd May 25, 2026
832216a
Merge branch 'develop' of https://github.com/ROCm/rocm-libraries into…
tvy-amd May 26, 2026
a74e562
Document TheRock CI integration in ai-rules.md
tvy-amd May 26, 2026
4ba5d60
[hipDNN] Fix clang-tidy findings in backend and data_sdk
tvy-amd May 26, 2026
8b885f3
[hipDNN] Simplify EnginePluginResourceManager dtor exception handling
tvy-amd May 26, 2026
b46a083
[hipDNN] Document why try/catch needed around safeDestroyHandle
tvy-amd May 26, 2026
22eaa0b
[hipDNN] Restore lambda and loop section comments in dtor
tvy-amd May 26, 2026
a218e2d
[hipDNN] Trim dtor exception comment
tvy-amd May 26, 2026
5d488fe
Merge branch 'users/tvy/clang-tidy-part-2' of https://github.com/ROCm…
tvy-amd May 26, 2026
d7c4235
[hipDNN] Suppress bugprone-empty-catch on dtor cleanup loop
tvy-amd May 26, 2026
22175f7
[hipDNN] Address additional clang-tidy findings
tvy-amd May 26, 2026
6a7aba4
Merge remote-tracking branch 'origin/develop' into users/tvy/clang-ti…
tvy-amd May 26, 2026
088a6a7
Merge branch 'users/tvy/clang-tidy-part-2' of https://github.com/ROCm…
tvy-amd May 26, 2026
8aaa3c7
fix: replace single-char string literals with char literals in descri…
tvy-amd May 26, 2026
a65b546
ci: disable clang-tidy in hipdnn-python-tests workflow
tvy-amd May 26, 2026
3d88022
ci: move hipdnn-python-tests to GPU runner
tvy-amd May 26, 2026
e4e852c
ci: revert hipdnn-python-tests runner and clang-tidy toggle
tvy-amd May 26, 2026
0b7825d
ci: drop GPU-dependent pytest step from hipdnn-python-tests
tvy-amd May 26, 2026
02d982a
ci: run CPU-only Python binding tests, skip @pytest.mark.gpu
tvy-amd May 26, 2026
6f50127
test: register 'integration' pytest marker
tvy-amd May 26, 2026
7099c88
ci: disable clang-tidy in python-tests workflow
tvy-amd May 26, 2026
a4f6723
Revert cpp/hpp changes and remove python-tests workflow
tvy-amd May 27, 2026
941c1e2
ci: add hipdnn_python_bindings to therock test matrix
tvy-amd May 27, 2026
bdd41e7
Revert remaining cpp/hpp changes in PR 7600
tvy-amd May 27, 2026
1140ba1
Revert descriptor.cpp.j2 template change
tvy-amd May 27, 2026
20de809
tmp: bump TheRock pin to 393a062fca21cd0054a5184ccf02fa9d9fe4d9ed
tvy-amd May 27, 2026
ffc2a4c
tmp: bump remaining inline TheRock pins to 393a062fca21cd0054a5184ccf…
tvy-amd May 27, 2026
f6911fc
ci: drop --include-iree-libs flag (removed in TheRock 393a062)
tvy-amd May 27, 2026
da6cf75
ci: move rocm-libraries checkout to external-sources/ for hipdnn pyth…
tvy-amd May 27, 2026
d71e9b4
ci: bump TheRock pin to 64985547315d for hipdnn python bindings path fix
tvy-amd May 27, 2026
1b20c41
ci: bump TheRock pin to 9fdb394fb7 for test venv pip fix
tvy-amd May 28, 2026
acd24cf
ci: bump TheRock pin to ecd0aa8fb for uv pip wheel fix
tvy-amd May 28, 2026
ec1ab5d
Potential fix for pull request finding 'Unused import'
tvy-amd May 28, 2026
e8f6fb4
[hipDNN] Install Python pytest files into share/hipdnn/tests/python
tvy-amd May 28, 2026
4874b13
ci: bump TheRock pin to b8a0e8bc8 for artifact-sourced Python tests
tvy-amd May 28, 2026
0256b07
Merge remote-tracking branch 'origin/develop' into users/tvy/python_b…
tvy-amd May 28, 2026
bd546f2
revert: drop ai-rules.md TheRock CI section from this PR
tvy-amd May 28, 2026
e82d72a
remove unused assemble_wheel.py
tvy-amd May 28, 2026
f6afa86
ci: bump TheRock pin to 32329200459a
tvy-amd May 28, 2026
38bdd9c
ci: retrigger after upstream hipBLASLt Tensile flake
tvy-amd May 28, 2026
11ec77d
Merge branch 'develop' into users/tvy/python_binding_tests
tvy-amd May 28, 2026
7fb0564
Revert "[hipDNN] Install Python pytest files into share/hipdnn/tests/…
tvy-amd May 28, 2026
ed4c922
Merge branch 'develop' into users/tvy/python_binding_tests
tvy-amd May 29, 2026
2624f8e
fix: re-install python pytest files into share/hipdnn/tests/python
tvy-amd May 29, 2026
e9078c4
ci(hipdnn): bump TheRock ref to wheel-pack fix; fix trailing whitespace
tvy-amd May 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/ci-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: "Single source of truth for shared CI constants (TheRock ref, Docke
outputs:
therock-ref:
description: "TheRock commit hash to use"
value: "94675052fd427fd2cc6ec9180079b3a0dc7d26b2" # 2026-05-27 commit
value: "9c0ca0a4a6900c6dfb5ede35f2034f303b53433e"
docker-image:
description: "Docker container image for Linux builds"
value: "ghcr.io/rocm/therock_build_manylinux_x86_64@sha256:48492540591673fdc8d51beb89bde41e7ba13cbb528f643c0a481ba42c4058f2"
Expand Down
1 change: 1 addition & 0 deletions .github/scripts/therock_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
"projects_to_test": [
"hipdnn",
"hipdnn_install",
"hipdnn_python_bindings",
"hipdnn-samples",
"miopenprovider",
"hipblasltprovider",
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/therock-ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ jobs:
with:
repository: "ROCm/TheRock"
path: TheRock
ref: ${{ inputs.therock_ref }}

ref: 9c0ca0a4a6900c6dfb5ede35f2034f303b53433e
- name: Install python deps
run: |
pip install -r TheRock/requirements.txt
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/therock-ci-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ jobs:
with:
repository: "ROCm/TheRock"
path: TheRock
ref: ${{ steps.ci-env.outputs.therock-ref }}

ref: 9c0ca0a4a6900c6dfb5ede35f2034f303b53433e
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/therock-ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
with:
repository: "ROCm/TheRock"
path: "TheRock"
ref: ${{ inputs.therock_ref }}
ref: 9c0ca0a4a6900c6dfb5ede35f2034f303b53433e

- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/therock-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ jobs:
with:
repository: "ROCm/TheRock"
path: TheRock
ref: ${{ steps.ci-env.outputs.therock-ref }}

ref: 9c0ca0a4a6900c6dfb5ede35f2034f303b53433e
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/therock-test-component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: "ROCm/TheRock"
ref: ${{ inputs.therock_ref }}
ref: 9c0ca0a4a6900c6dfb5ede35f2034f303b53433e


- name: Configure git for long paths on Windows
if: ${{ runner.os == 'Windows' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/therock-test-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: "ROCm/TheRock"
ref: ${{ inputs.therock_ref }}
ref: 9c0ca0a4a6900c6dfb5ede35f2034f303b53433e

- name: Setting up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
Expand Down
3 changes: 3 additions & 0 deletions projects/hipdnn/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,7 @@ else()
install(TARGETS hipdnn_frontend_python DESTINATION "${_staging}")
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/hipdnn_frontend/__init__.py"
DESTINATION "${_staging}")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/hipdnn_frontend/test/"
DESTINATION "share/hipdnn/tests/python"
FILES_MATCHING PATTERN "*.py")
endif()
2 changes: 2 additions & 0 deletions projects/hipdnn/python/hipdnn_frontend/test/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright © Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
24 changes: 24 additions & 0 deletions projects/hipdnn/python/hipdnn_frontend/test/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright © Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT

"""Shared pytest fixtures for hipDNN Python binding tests."""

import pytest

import hipdnn_frontend as hipdnn


@pytest.fixture()
def handle():
"""Create a hipDNN handle for GPU operations."""
return hipdnn.create_handle()


@pytest.fixture()
def graph():
"""Create a hipDNN Graph configured with FLOAT data types."""
g = hipdnn.Graph()
g.set_io_data_type(hipdnn.DataType.FLOAT)
g.set_intermediate_data_type(hipdnn.DataType.FLOAT)
g.set_compute_data_type(hipdnn.DataType.FLOAT)
return g
88 changes: 88 additions & 0 deletions projects/hipdnn/python/hipdnn_frontend/test/helpers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Copyright © Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT

"""Shared helper functions for hipDNN Python binding tests."""

import numpy as np

import hipdnn_frontend as hipdnn


def build_conv_fprop_graph(
graph,
n=16,
c=16,
h=16,
w=16,
k=16,
r=3,
s=3,
stride=1,
pad=1,
dilation=1,
):
"""Build a complete convolution forward propagation graph.

Returns:
Tuple of (graph, x_tensor, weight_tensor, y_tensor, out_h, out_w).
"""
out_h = (h + 2 * pad - dilation * (r - 1) - 1) // stride + 1
out_w = (w + 2 * pad - dilation * (s - 1) - 1) // stride + 1

graph.set_name("conv_fprop_test")

x = hipdnn.Tensor.create([n, c, h, w], hipdnn.DataType.FLOAT)
x.set_name("input_x")

weight = hipdnn.Tensor.create([k, c, r, s], hipdnn.DataType.FLOAT)
weight.set_name("weight")

conv_attrs = hipdnn.ConvFpropAttributes()
conv_attrs.set_name("conv_fprop_node")
conv_attrs.set_padding([pad, pad])
conv_attrs.set_stride([stride, stride])
conv_attrs.set_dilation([dilation, dilation])

y = graph.conv_fprop(x, weight, conv_attrs)
y.set_name("output_y")
y.set_output(True)

return graph, x, weight, y, out_h, out_w


def execute_graph(graph, handle, tensor_uid_to_data):
"""Execute a graph with the given tensor data.

Args:
graph: A fully-built hipDNN graph (validated, built, plans created).
handle: A hipDNN handle.
tensor_uid_to_data: Dict mapping tensor UIDs to numpy arrays.
Output tensors should have zero-initialized arrays.

Returns:
Dict mapping tensor UIDs to result numpy arrays (copied from device).
"""
buffers = {}
variant_pack = {}
for uid, data in tensor_uid_to_data.items():
buf = hipdnn.DeviceBuffer(data.nbytes)
buf.copy_from_host(data.tobytes())
buffers[uid] = (buf, data.shape, data.dtype)
variant_pack[uid] = buf.ptr()

workspace_size = graph.get_workspace_size()
workspace_buffer = None
workspace_ptr = 0
if workspace_size > 0:
workspace_buffer = hipdnn.DeviceBuffer(workspace_size)
workspace_ptr = workspace_buffer.ptr()

exec_result = graph.execute(handle, variant_pack, workspace_ptr)
assert exec_result.is_good(), f"Graph execution failed: {exec_result.get_message()}"

results = {}
for uid, (buf, shape, dtype) in buffers.items():
host_bytes = buf.copy_to_host()
results[uid] = np.frombuffer(host_bytes, dtype=dtype).reshape(shape)

return results
104 changes: 104 additions & 0 deletions projects/hipdnn/python/hipdnn_frontend/test/test_conv_dgrad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Copyright © Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT

"""Integration tests for convolution backward data gradient."""

import numpy as np
import pytest

import hipdnn_frontend as hipdnn

from .helpers import execute_graph

# Dimensions used across tests
N, C, H, W = 16, 16, 16, 16
K, R, S = 16, 3, 3
STRIDE, PAD, DIL = 1, 1, 1
OUT_H = (H + 2 * PAD - DIL * (R - 1) - 1) // STRIDE + 1
OUT_W = (W + 2 * PAD - DIL * (S - 1) - 1) // STRIDE + 1


def _build_conv_dgrad_graph(graph):
"""Build a conv_dgrad graph returning (graph, dy, weight, dx)."""
graph.set_name("conv_dgrad_test")

dy = hipdnn.Tensor.create([N, K, OUT_H, OUT_W], hipdnn.DataType.FLOAT)
dy.set_name("output_gradient_dy")

weight = hipdnn.Tensor.create([K, C, R, S], hipdnn.DataType.FLOAT)
weight.set_name("weight")

conv_attrs = hipdnn.ConvDgradAttributes()
conv_attrs.set_name("conv_dgrad_node")
conv_attrs.set_pre_padding([PAD, PAD])
conv_attrs.set_post_padding([PAD, PAD])
conv_attrs.set_stride([STRIDE, STRIDE])
conv_attrs.set_dilation([DIL, DIL])

dx = graph.conv_dgrad(dy, weight, conv_attrs)
dx.set_name("input_gradient_dx")
dx.set_output(True)

return graph, dy, weight, dx


@pytest.mark.gpu
@pytest.mark.integration
class TestConvDgrad:
"""Tests for convolution backward data gradient end-to-end pipeline."""

def test_graph_validates_successfully(self, graph):
"""Build a conv_dgrad graph and verify validation passes."""
graph, dy, weight, dx = _build_conv_dgrad_graph(graph)

result = graph.validate()
assert result.is_good(), f"Validation failed: {result.get_message()}"

def test_operation_graph_builds(self, graph, handle):
"""Build a conv_dgrad operation graph with backend handle."""
graph, dy, weight, dx = _build_conv_dgrad_graph(graph)

result = graph.validate()
assert result.is_good(), f"Validation failed: {result.get_message()}"

result = graph.build_operation_graph(handle)
assert result.is_good(), f"Build operation graph failed: {result.get_message()}"

def test_execution_plans_created(self, graph, handle):
"""Build execution plans for conv_dgrad."""
graph, dy, weight, dx = _build_conv_dgrad_graph(graph)

assert graph.validate().is_good()
assert graph.build_operation_graph(handle).is_good()
assert graph.create_execution_plans().is_good()
assert graph.check_support().is_good()
assert graph.build_plans().is_good()

def test_execution_produces_nonzero_output(self, graph, handle):
"""Full end-to-end conv_dgrad: execute and verify non-zero output."""
graph, dy, weight, dx = _build_conv_dgrad_graph(graph)

assert graph.validate().is_good()
assert graph.build_operation_graph(handle).is_good()
assert graph.create_execution_plans().is_good()
assert graph.check_support().is_good()
assert graph.build_plans().is_good()

dy_data = np.random.uniform(
0.0,
1.0,
[N, K, OUT_H, OUT_W],
).astype(np.float32)
w_data = np.random.uniform(0.0, 1.0, [K, C, R, S]).astype(np.float32)
dx_data = np.zeros([N, C, H, W], dtype=np.float32)

tensor_data = {
dy.get_uid(): dy_data,
weight.get_uid(): w_data,
dx.get_uid(): dx_data,
}

results = execute_graph(graph, handle, tensor_data)
dx_result = results[dx.get_uid()]

assert not np.all(dx_result == 0), "Conv dgrad output is all zeros"
Loading