bazel-contrib / bazel-contrib/rules_cuda

How to add NVSHMEM?

Open
#387 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
122
Forks
73
Avg merge
7h 34m
Merged PRs (30d)
7

Description

Hi, I wonder if it's possible to add NVSHMEM (either to rules_cuda or just on my project for now)?

I saw many cuda libraries in the [`templates`](https://github.com/bazel-contrib/rules_cuda/tree/main/cuda/private/templates) folder. I think those `cc_import` make sense to me. But there are still a few things that I don't know how to do:

1. Is there a `cc_import` equivalent for `cuda_import`? `libnvshmem_device.a` is a library that should be linked to the device code instead of host code.
2. How to export header files as well?

Here's the directory structure of NVSHMEM for reference:

[nvshmem-dir.txt](https://github.com/user-attachments/files/21473560/nvshmem-dir.txt)

Thanks!

Contributor guide

Open the contributing guide

Research direction

Review cuda/private/templates and the attached nvshmem-dir.txt, then inspect the existing cc_import patterns and how rules_cuda handles host and device libraries. Done means establishing and documenting an agreed approach for exposing NVSHMEM headers and linking libnvshmem_device.a, either in rules_cuda or project-local configuration.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.