mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Summary: Skip building extensions if windows following https://github.com/pytorch/pytorch/pull/67161#issuecomment-958062611 Related issue: https://github.com/pytorch/pytorch/issues/67073 cc ngimel xwang233 ptrblck Pull Request resolved: https://github.com/pytorch/pytorch/pull/67735 Reviewed By: bdhirsh Differential Revision: D32141250 Pulled By: ngimel fbshipit-source-id: 9bfdb7cf694c99f6fc8cbe9033a12429b6e4b6fe
18 lines
422 B
C++
18 lines
422 B
C++
#include <iostream>
|
|
|
|
#include <torch/extension.h>
|
|
#include <ATen/cuda/CUDAContext.h>
|
|
|
|
#include <cublas_v2.h>
|
|
|
|
torch::Tensor noop_cublas_function(torch::Tensor x) {
|
|
cublasHandle_t handle;
|
|
TORCH_CUDABLAS_CHECK(cublasCreate(&handle));
|
|
TORCH_CUDABLAS_CHECK(cublasDestroy(handle));
|
|
return x;
|
|
}
|
|
|
|
PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
|
|
m.def("noop_cublas_function", &noop_cublas_function, "a cublas function");
|
|
}
|