mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Close https://github.com/pytorch/pytorch/issues/57543 Doc: check `Relocatable device code linking:` in https://docs-preview.pytorch.org/78225/cpp_extension.html#torch.utils.cpp_extension.CUDAExtension Pull Request resolved: https://github.com/pytorch/pytorch/pull/78225 Approved by: https://github.com/ezyang, https://github.com/malfet
7 lines
139 B
Plaintext
7 lines
139 B
Plaintext
#include <cuda.h>
|
|
#include <cuda_runtime.h>
|
|
|
|
__device__ void add(const float* a, const float* b, float* output) {
|
|
*output = *a + *b;
|
|
}
|