Rate this Page

Program Listing for File xpu.h#

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

#pragma once

#include <torch/csrc/Export.h>

#include <cstddef>
#include <cstdint>

namespace torch::xpu {

size_t TORCH_API device_count();

bool TORCH_API 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);

} // namespace torch::xpu