Shortcuts

Program Listing for File cuda.h

Return to documentation for file (torch/csrc/api/include/torch/cuda.h)

#pragma once

#include <torch/csrc/WindowsTorchApiMacro.h>

#include <cstdint>
#include <cstddef>

namespace torch {
namespace cuda {

size_t TORCH_API device_count();

bool TORCH_API is_available();

bool TORCH_API cudnn_is_available();

void TORCH_API manual_seed(uint64_t seed);

void TORCH_API manual_seed_all(uint64_t seed);

void TORCH_API synchronize(int64_t device_index = -1);

} // namespace cuda
} // namespace torch

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources