Files
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

34 lines
1.4 KiB
Django/Jinja

{% from "macros.j2" import vector_const_name %}
// Copyright © Advanced Micro Devices, Inc., or its affiliates.
// SPDX-License-Identifier: MIT
#pragma once
#include <array>
#include <cstdint>
namespace hipdnn_tests::constants
{
// Standard {{ op.name }} constants for testing get/set of valid operations.
// These represent "any valid {{ op.name | lower }}" — specific values are not significant.
{% for tf in op.tensor_fields %}
{% set uid = op.test_data.tensor_uids.get(tf.name, loop.index) %}
{% set tc = op.test_data.tensor_configs.get(tf.name) %}
constexpr int64_t {{ op.tensor_const_prefix }}TENSOR_{{ tf.name | upper }}_UID = {{ uid }};
{% if tc %}
constexpr std::array<int64_t, {{ tc.dims | length }}> {{ op.tensor_const_prefix }}TENSOR_{{ tf.name | upper }}_DIMS = {{ '{' }}{{ tc.dims | join(', ') }}{{ '}' }};
constexpr std::array<int64_t, {{ tc.strides | length }}> {{ op.tensor_const_prefix }}TENSOR_{{ tf.name | upper }}_STRIDES = {{ '{' }}{{ tc.strides | join(', ') }}{{ '}' }};
{% endif %}
{% endfor %}
{% for df in op.data_fields if df.is_vector and df.required %}
{% if df.name in op.test_data.field_values %}
{% set fv = op.test_data.field_values[df.name] %}
{% set const_name = vector_const_name(df, op) %}
constexpr std::array<int64_t, {{ fv | length }}> {{ const_name }} = {{ '{' }}{{ fv | join(', ') }}{{ '}' }};
{% endif %}
{% endfor %}
} // namespace hipdnn_tests::constants