# bazel_rule_cuda **Repository Path**: jason91/bazel_rule_cuda ## Basic Information - **Project Name**: bazel_rule_cuda - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-01-11 - **Last Updated**: 2022-01-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # bazel_rule_cuda rules for bazel for build cuda code port most code from tensorflow, use at risk usage: ```python #WORKSPACE git_repository( name = "bazel_rule_cuda", remote = "https://github.com/biolee/bazel_rule_cuda", ) load('@bazel_rule_cuda/gpus/cuda.bzl',cuda_configure) cuda_configure('local_config_cuda') #BUILD load('@bazel_rule_cuda/gpus/cuda.bzl',cuda_library) cuda_library( name='mycudalib', srcs='vectorAdd.cu.cc', hdrs=['main.h'], deps=[], ) cc_binary( name='main', srcs=['main.cc'], hdrs=['main.h'], deps=[':mycudalib'], ) #defalt build with -G -g to nvcc bazel build :main #defalt compile opt bazel build -c=opt :main ```