<commit_before>"""
Sample low-level HSA runtime example.
"""
from __future__ import print_function, division

import numpy as np
from numba.hsa.hsadrv.driver import hsa


if __name__=='__main__':
    WIDTH = 4
    HEIGHT = 4
    # note that hsa library is automaticaaly initialized on first use
    components = [a for a in hsa.agents if a.is_component]

    # select the first one
    if len(components) < 1:
        sys.exit("No HSA component found!")

    gpu = components[0]

    print("Using agent: {0} with queue size: {1}".format(gpu.name, gpu.max_queue_size))
    q = gpu.create_queue_multi(gpy.max_queue_size)

    a = np.random.random(WIDTH*HEIGHT).reshape((HEIGHT, WIDTH))
    b = np.random.random(WIDTH*HEIGHT).reshape((WIDTH, HEIGHT))
    print("input matrix A:\n", a)
    print("input matrix B:\n", b)

    s = hsa.create_signal(1)

    print(s)

    return 0<commit_msg>removed spurious return<commit_after>"""
Sample low-level HSA runtime example.
"""
from __future__ import print_function, division

import numpy as np
from numba.hsa.hsadrv.driver import hsa


if __name__=='__main__':
    WIDTH = 4
    HEIGHT = 4
    # note that hsa library is automaticaaly initialized on first use
    components = [a for a in hsa.agents if a.is_component]

    # select the first one
    if len(components) < 1:
        sys.exit("No HSA component found!")

    gpu = components[0]

    print("Using agent: {0} with queue size: {1}".format(gpu.name, gpu.max_queue_size))
    q = gpu.create_queue_multi(gpy.max_queue_size)

    a = np.random.random(WIDTH*HEIGHT).reshape((HEIGHT, WIDTH))
    b = np.random.random(WIDTH*HEIGHT).reshape((WIDTH, HEIGHT))
    print("input matrix A:\n", a)
    print("input matrix B:\n", b)

    s = hsa.create_signal(1)

    print(s)

{'fraction_non_alphanumeric': 0.1211092246745897, 'fraction_numerical': 0.008488964346349746, 'mean_word_length': 3.4534005037783375, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7572922', 'n_tokens_mistral': 635, 'n_tokens_neox': 590, 'n_words': 169}