def test_check_contig_1(): ac, ag = gen_gpuarray((50, 1, 20), 'float32', ctx=context) bc, bg = gen_gpuarray((50, 1, 20), 'float32', ctx=context) n, offsets, contig = check_contig((ag, bg)) assert n == 1000 assert offsets == (0, 0) assert contig
def test_check_contig_2(): ac, ag = gen_gpuarray((50, 1, 20), 'float32', ctx=context) bc, bg = gen_gpuarray((50, 1, 20), 'float32', ctx=context, sliced=2) n, offsets, contig = check_contig((ag, bg)) assert n == None assert offsets == None assert not contig