"""Tests for per-block %active caching and static no-EXEC-write dst() fast path.""" import os import shutil import struct import subprocess import sys import tempfile import unittest HERE = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, HERE) import support # noqa: E402 from support import rdna2spirv # noqa: E402 from spirv_wave_interp import run_wave # noqa: E402 def _make_fssm_cs(user_sgprs=4, tgid_mask=1, tid_cnt=0, threads=(64, 1, 1), wave32=True): buf = bytearray(0x160) buf[0xD4] = 0x20 if wave32 else 0x00 rsrc2 = ((user_sgprs & 31) << 1) | ((tgid_mask & 7) << 7) | ((tid_cnt & 3) << 11) struct.pack_into("