<commit_before>"""Rules and macros for MLIR"""

load("@local_config_cuda//cuda:build_defs.bzl", "if_cuda_is_configured")

if_cuda_available = if_cuda_is_configured

def _cc_headers_only_impl(ctx):
    return CcInfo(compilation_context = ctx.attr.src[CcInfo].compilation_context)

cc_headers_only = rule(
    implementation = _cc_headers_only_impl,
    attrs = {
        "src": attr.label(
            mandatory = True,
            providers = [CcInfo],
        ),
    },
    doc = "Provides the headers from 'src' without linking anything.",
    provides = [CcInfo],
)<commit_msg>Disable CUDA in @llvm-project//mlir.<commit_after>"""Rules and macros for MLIR"""

def if_cuda_available(if_true, if_false = []):
    return if_false

def _cc_headers_only_impl(ctx):
    return CcInfo(compilation_context = ctx.attr.src[CcInfo].compilation_context)

cc_headers_only = rule(
    implementation = _cc_headers_only_impl,
    attrs = {
        "src": attr.label(
            mandatory = True,
            providers = [CcInfo],
        ),
    },
    doc = "Provides the headers from 'src' without linking anything.",
    provides = [CcInfo],
)
{'fraction_non_alphanumeric': 0.11552028218694885, 'fraction_numerical': 0.0, 'mean_word_length': 3.39922480620155, 'pattern_counts': {'":': 2, '<': 3, '<?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': '2208037', 'n_tokens_mistral': 381, 'n_tokens_neox': 379, 'n_words': 76}