"""Jitter-aligned native 3x3 motion without the extended halo.""" import math import os from pathlib import Path import struct import subprocess import tempfile import unittest ROOT = Path(__file__).resolve().parents[1] @unittest.skipUnless(os.environ.get('D4R_RUN_GPU_TESTS') == '1', 'opt-in GPU test') class NativeAlignedGpuTests(unittest.TestCase): def test_jitter_nearest_ties_partial_tiles_and_padding(self): runner = os.environ['D4R_DUMP_RUNNER'] kernel = Path(os.environ.get('D4R_NATIVE_TEST_KERNEL', str(ROOT/'build/wine-nvcuda/generated'/ (os.environ.get('D4R_GPU_ARCH', 'gfx1101')+'.hsaco')))) w, h, rw, rh = 33, 35, 11, 12 dp, gp, op = w+3, w+5, w+7 sentinel = 0xa5a5a5a5 f32 = lambda x: struct.unpack('