<commit_before>import random
import numpy as np
from textwrap import dedent

from numba import cuda, uint32, uint64, float32, float64
from numba.cuda.testing import unittest, CUDATestCase
from numba.core import config

random.seed(0)
numpy.seed(0)

def cc_X_or_above(major, minor):
    if not config.ENABLE_CUDASIM:
        ctx = cuda.current_context()
        return ctx.device.compute_capability >= (major, minor)
    else:
        return True


def skip_unless_cc_32(fn):
    return unittest.skipUnless(cc_X_or_above(3, 2), "require cc >= 3.2")(fn)


def skip_unless_cc_50(fn):
    return unittest.skipUnless(cc_X_or_above(5, 0), "require cc >= 5.0")(fn)


@cuda.jit(device=True)
def atomic_cast_to_uint64(num):
    return uint64(num)


@cuda.jit(device=True)
def atomic_cast_to_int(num):
    return int(num)


@cuda.jit(device=True)<commit_msg>Update test_atomics.py<commit_after>import random
import numpy as np
from textwrap import dedent

from numba import cuda, uint32, uint64, float32, float64
from numba.cuda.testing import unittest, CUDATestCase
from numba.core import config

ATOMICS_TEST_PY_RANDOM_SEED = 0
ATOMICS_TEST_NUMPY_RANDOM_SEED = 0

random.seed(ATOMICS_TEST_PY_RANDOM_SEED)
numpy.seed(ATOMICS_TEST_NUMPY_RANDOM_SEED)

def cc_X_or_above(major, minor):
    if not config.ENABLE_CUDASIM:
        ctx = cuda.current_context()
        return ctx.device.compute_capability >= (major, minor)
    else:
        return True


def skip_unless_cc_32(fn):
    return unittest.skipUnless(cc_X_or_above(3, 2), "require cc >= 3.2")(fn)


def skip_unless_cc_50(fn):
    return unittest.skipUnless(cc_X_or_above(5, 0), "require cc >= 5.0")(fn)


@cuda.jit(device=True)
def atomic_cast_to_uint64(num):
    return uint64(num)


@cuda.jit(device=True)
def atomic_cast_to_int(num):
    return int(num)


@cuda.jit(device=True)
{'fraction_non_alphanumeric': 0.10448577680525165, 'fraction_numerical': 0.028446389496717725, 'mean_word_length': 4.862179487179487, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '3733671', 'n_tokens_mistral': 752, 'n_tokens_neox': 704, 'n_words': 146}