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
81 lines
3.5 KiB
Python
81 lines
3.5 KiB
Python
################################################################################
|
|
#
|
|
# Copyright (C) 2020-2022 Advanced Micro Devices, Inc. All rights reserved.
|
|
#
|
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
# of this software and associated documentation files (the "Software"), to deal
|
|
# in the Software without restriction, including without limitation the rights
|
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
# copies of the Software, and to permit persons to whom the Software is
|
|
# furnished to do so, subject to the following conditions:
|
|
#
|
|
# The above copyright notice and this permission notice shall be included in
|
|
# all copies or substantial portions of the Software.
|
|
#
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
# SOFTWARE.
|
|
#
|
|
################################################################################
|
|
|
|
from unittest import SkipTest
|
|
|
|
from Tensile.Common import tryAssembler
|
|
|
|
def test_Simple(useGlobalParameters):
|
|
with useGlobalParameters():
|
|
assert tryAssembler((9,0,0), "")
|
|
# disable for now due to a clang-12 assembler bug
|
|
# assert not tryAssembler((20,0,0), "")
|
|
# disable for now due to targetid changes
|
|
|
|
#def test_Options(useGlobalParameters):
|
|
# with useGlobalParameters():
|
|
# assert tryAssembler((9,0,6), "", False, "-mllvm --amdhsa-code-object-version=2")
|
|
|
|
def test_Macro(useGlobalParameters):
|
|
"""
|
|
Test a multi-line kernel that defines a macro.
|
|
"""
|
|
with useGlobalParameters():
|
|
|
|
thekernel = r"""
|
|
.text
|
|
.macro _v_add_co_u32 dst:req, cc:req, src0:req, src1:req, dpp=
|
|
v_add_co_u32 \dst, \cc, \src0, \src1 \dpp
|
|
.endm
|
|
|
|
.set vgprLocalReadAddrB, 93
|
|
|
|
_v_add_co_u32 v[vgprLocalReadAddrB+0], vcc, 0x400, v[vgprLocalReadAddrB+0]
|
|
a_label:
|
|
|
|
v_add_co_u32 v[vgprLocalReadAddrB+0], vcc, 0x400, v[vgprLocalReadAddrB+0]
|
|
_v_add_co_u32 v[vgprLocalReadAddrB+0], vcc, 0x400, v[vgprLocalReadAddrB+0]
|
|
|
|
"""
|
|
|
|
# disable for now due to targetid changes
|
|
# assert tryAssembler((10,1,0), thekernel.format(arch="gfx1010"), True, '-mllvm --amdhsa-code-object-version=4')
|
|
assert tryAssembler((10,1,1), thekernel.format(arch="gfx1011"))
|
|
assert not tryAssembler((8,0,3), thekernel.format(arch="gfx803"))
|
|
|
|
def test_gfx12_wmma_probe_shape(useGlobalParameters):
|
|
isa = (12, 0, 1)
|
|
gfx12Probe = "v_wmma_f32_16x16x16_f16 v[0:7], v[8:11], v[12:15], v[0:7]"
|
|
rocisaWave64Probe = "v_wmma_f32_16x16x16_f16 v[0:3], v[8:9], v[16:17], v[0:3]"
|
|
|
|
with useGlobalParameters():
|
|
if not tryAssembler(isa, ""):
|
|
raise SkipTest("gfx1201 assembler target is not available")
|
|
|
|
assert tryAssembler(isa, gfx12Probe, False, "-mno-wavefrontsize64")
|
|
assert tryAssembler(isa, gfx12Probe, False, "-mno-wavefrontsize64", "-mcumode")
|
|
assert tryAssembler(isa, gfx12Probe, False, "-mno-wavefrontsize64", "-mno-cumode")
|
|
assert not tryAssembler(isa, gfx12Probe, False, "-mwavefrontsize64")
|
|
assert not tryAssembler(isa, rocisaWave64Probe, False, "-mno-wavefrontsize64")
|