Skip to content

[pytorch] expose __ldg(const Half* ptr) to Clang in host mode#38151

Closed
igorsugak wants to merge 1 commit intopytorch:masterfrom
igorsugak:export-D21481297
Closed

[pytorch] expose __ldg(const Half* ptr) to Clang in host mode#38151
igorsugak wants to merge 1 commit intopytorch:masterfrom
igorsugak:export-D21481297

Conversation

@igorsugak
Copy link
Copy Markdown
Contributor

Summary: We need to expose this method to Clang unconditionally when building CUDA, otherwise it would error on device code calling __ldg with Half*.

Test Plan:

buck build -c fbcode.caffe2_use_mpi=1 -c fbcode.cuda_use_clang=true mode/opt //experimental/training_supercomputer/trainer/hpc_pt:trainer

Differential Revision: D21481297

Summary: We need to expose this method to Clang unconditionally when building CUDA, otherwise it would error on device code calling `__ldg` with `Half*`.

Test Plan:
```
buck build -c fbcode.caffe2_use_mpi=1 -c fbcode.cuda_use_clang=true mode/opt //experimental/training_supercomputer/trainer/hpc_pt:trainer
```

Differential Revision: D21481297

fbshipit-source-id: 14ed9ae14dd7a7ab227918a4ed23b4ac70d431be
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D21481297

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in d035d05.

laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
…h#38151)

Summary:
Pull Request resolved: pytorch#38151

We need to expose this method to Clang unconditionally when building CUDA, otherwise it would error on device code calling `__ldg` with `Half*`.

Test Plan:
```
buck build -c fbcode.caffe2_use_mpi=1 -c fbcode.cuda_use_clang=true mode/opt //experimental/training_supercomputer/trainer/hpc_pt:trainer
```

Reviewed By: ngimel

Differential Revision: D21481297

fbshipit-source-id: aacfe7de2cdc8542908249081ddb58170b1e35ff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants