oneflow.cuda

ONEFLOW.CUDA

Copyright 2020 The OneFlow Authors. All rights reserved.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

oneflow.cuda.BoolTensor(*args, **kwargs)

Creates a Tensor with the dtype of bool and it has the same parameters as oneflow.Tensor().

oneflow.cuda.ByteTensor(*args, **kwargs)

Creates a Tensor with the dtype of uint8 and it has the same parameters as oneflow.Tensor().

oneflow.cuda.CharTensor(*args, **kwargs)

Creates a Tensor with the dtype of int8 and it has the same parameters as oneflow.Tensor().

oneflow.cuda.DoubleTensor(*args, **kwargs)

Creates a Tensor with the dtype of float64 and it has the same parameters as oneflow.Tensor().

oneflow.cuda.FloatTensor(*args, **kwargs)

Creates a Tensor with the dtype of float32 and it has the same parameters as oneflow.Tensor().

oneflow.cuda.HalfTensor(*args, **kwargs)

Creates a Tensor with the dtype of float16 and it has the same parameters as oneflow.Tensor().

oneflow.cuda.IntTensor(*args, **kwargs)

Creates a Tensor with the dtype of int32 and it has the same parameters as oneflow.Tensor().

oneflow.cuda.LongTensor(*args, **kwargs)

Creates a Tensor with the dtype of int64 and it has the same parameters as oneflow.Tensor().

oneflow.cuda.device_count()int

Returns the number of GPUs available..

oneflow.cuda.is_available()bool

Returns a bool indicating if CUDA is currently available.