hasktorch-gradually-typed-0.2.0.0: experimental project for hasktorch
Safe HaskellSafe-Inferred
LanguageHaskell2010

Torch.GraduallyTyped.DType

Synopsis

Documentation

data DType Source #

Constructors

Bool

Bool

UInt8

Byte

Int8

Char

Int16

Short

Int32

Int

Int64

Long

Half

Half

Float

Float

Double

Double

ComplexHalf

ComplexHalf

ComplexFloat

ComplexFloat

ComplexDouble

ComplexDouble

QInt8

QInt8

QUInt8

QUInt8

QInt32

QInt32

BFloat16

BFloat16

Instances

Instances details
Read DType Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

Show DType Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

Eq DType Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

Methods

(==) :: DType -> DType -> Bool Source #

(/=) :: DType -> DType -> Bool Source #

SingKind DType Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

Associated Types

type Demote DType = (r :: Type) Source #

Methods

fromSing :: forall (a :: DType). Sing a -> Demote DType Source #

toSing :: Demote DType -> SomeSing DType Source #

Castable DType ScalarType Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

Methods

cast :: DType -> (ScalarType -> IO r) -> IO r Source #

uncast :: ScalarType -> (DType -> IO r) -> IO r Source #

SingI 'BFloat16 Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

SingI 'Bool Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

Methods

sing :: Sing 'Bool Source #

SingI 'ComplexDouble Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

SingI 'ComplexFloat Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

SingI 'ComplexHalf Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

SingI 'Double Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

Methods

sing :: Sing 'Double Source #

SingI 'Float Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

Methods

sing :: Sing 'Float Source #

SingI 'Half Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

Methods

sing :: Sing 'Half Source #

SingI 'Int16 Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

Methods

sing :: Sing 'Int16 Source #

SingI 'Int32 Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

Methods

sing :: Sing 'Int32 Source #

SingI 'Int64 Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

Methods

sing :: Sing 'Int64 Source #

SingI 'Int8 Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

Methods

sing :: Sing 'Int8 Source #

SingI 'QInt32 Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

Methods

sing :: Sing 'QInt32 Source #

SingI 'QInt8 Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

Methods

sing :: Sing 'QInt8 Source #

SingI 'QUInt8 Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

Methods

sing :: Sing 'QUInt8 Source #

SingI 'UInt8 Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

Methods

sing :: Sing 'UInt8 Source #

MkPosC device shape seqDim seqName seqSize output => HasForward MkAbsPos (Tensor gradient layout device dataType shape) generatorDevice (Tensor ('Gradient 'WithoutGradient) ('Layout 'Dense) device ('DataType 'Int64) ('Shape '['Dim ('Name "*") seqSize])) generatorDevice Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Transformer.Type

Methods

forward :: MonadThrow m => MkAbsPos -> Tensor gradient layout device dataType shape -> Generator generatorDevice -> m (Tensor ('Gradient 'WithoutGradient) ('Layout 'Dense) device ('DataType 'Int64) ('Shape '['Dim ('Name "*") seqSize]), Generator generatorDevice) Source #

KnownDataType ('UncheckedDataType :: DataType DType) Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

SGetDataType ('UncheckedDataType :: DataType DType) Source # 
Instance details

Defined in Torch.GraduallyTyped.Tensor.Type

Methods

sGetDataType :: forall (gradient :: Gradient RequiresGradient) (layout :: Layout LayoutType) (device :: Device (DeviceType Nat)) (shape :: Shape [Dim (Name Symbol) (Size Nat)]). Tensor gradient layout device 'UncheckedDataType shape -> SDataType 'UncheckedDataType Source #

getDType :: forall (gradient :: Gradient RequiresGradient) (layout :: Layout LayoutType) (device :: Device (DeviceType Nat)) (shape :: Shape [Dim (Name Symbol) (Size Nat)]). Tensor gradient layout device 'UncheckedDataType shape -> DType Source #

SingKind (DataType DType) Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

Associated Types

type Demote (DataType DType) = (r :: Type) Source #

SingI dType => SingI ('DataType dType :: DataType DType) Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

Methods

sing :: Sing ('DataType dType) Source #

MkRelPosC device shape seqDim seqName seqSize output => HasForward (MkRelPos relPosEncBucketDim) (Tensor gradient layout device dataType shape) generatorDevice (Tensor ('Gradient 'WithoutGradient) ('Layout 'Dense) device ('DataType 'Int64) ('Shape '['Dim ('Name "*") ('Size 1), 'Dim ('Name "*") seqSize, 'Dim ('Name "*") seqSize])) generatorDevice Source # 
Instance details

Defined in Torch.GraduallyTyped.NN.Transformer.Type

Methods

forward :: MonadThrow m => MkRelPos relPosEncBucketDim -> Tensor gradient layout device dataType shape -> Generator generatorDevice -> m (Tensor ('Gradient 'WithoutGradient) ('Layout 'Dense) device ('DataType 'Int64) ('Shape '['Dim ('Name "*") ('Size 1), 'Dim ('Name "*") seqSize, 'Dim ('Name "*") seqSize]), Generator generatorDevice) Source #

KnownDType dType => KnownDataType ('DataType dType) Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

SingI dType => SGetDataType ('DataType dType) Source # 
Instance details

Defined in Torch.GraduallyTyped.Tensor.Type

Methods

sGetDataType :: forall (gradient :: Gradient RequiresGradient) (layout :: Layout LayoutType) (device :: Device (DeviceType Nat)) (shape :: Shape [Dim (Name Symbol) (Size Nat)]). Tensor gradient layout device ('DataType dType) shape -> SDataType ('DataType dType) Source #

getDType :: forall (gradient :: Gradient RequiresGradient) (layout :: Layout LayoutType) (device :: Device (DeviceType Nat)) (shape :: Shape [Dim (Name Symbol) (Size Nat)]). Tensor gradient layout device ('DataType dType) shape -> DType Source #

type Demote DType Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

type Sing Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

type Sing = SDType
type Demote (DataType DType) Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

type Sing Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

type family BoolSym0 :: DType where ... Source #

Equations

BoolSym0 = 'Bool 

type family UInt8Sym0 :: DType where ... Source #

Equations

UInt8Sym0 = 'UInt8 

type family Int8Sym0 :: DType where ... Source #

Equations

Int8Sym0 = 'Int8 

type family Int16Sym0 :: DType where ... Source #

Equations

Int16Sym0 = 'Int16 

type family Int32Sym0 :: DType where ... Source #

Equations

Int32Sym0 = 'Int32 

type family Int64Sym0 :: DType where ... Source #

Equations

Int64Sym0 = 'Int64 

type family HalfSym0 :: DType where ... Source #

Equations

HalfSym0 = 'Half 

type family FloatSym0 :: DType where ... Source #

Equations

FloatSym0 = 'Float 

type family DoubleSym0 :: DType where ... Source #

Equations

DoubleSym0 = 'Double 

type family ComplexHalfSym0 :: DType where ... Source #

type family ComplexFloatSym0 :: DType where ... Source #

type family ComplexDoubleSym0 :: DType where ... Source #

type family QInt8Sym0 :: DType where ... Source #

Equations

QInt8Sym0 = 'QInt8 

type family QUInt8Sym0 :: DType where ... Source #

Equations

QUInt8Sym0 = 'QUInt8 

type family QInt32Sym0 :: DType where ... Source #

Equations

QInt32Sym0 = 'QInt32 

type family BFloat16Sym0 :: DType where ... Source #

Equations

BFloat16Sym0 = 'BFloat16 

data SDType :: DType -> Type where Source #

Instances

Instances details
Show (SDType dType) Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

Methods

showsPrec :: Int -> SDType dType -> ShowS Source #

show :: SDType dType -> String Source #

showList :: [SDType dType] -> ShowS Source #

class KnownDType (dType :: DType) where Source #

Instances

Instances details
KnownDType 'Bool Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

KnownDType 'Double Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

KnownDType 'Float Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

KnownDType 'Half Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

KnownDType 'Int16 Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

KnownDType 'Int32 Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

KnownDType 'Int64 Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

KnownDType 'Int8 Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

KnownDType 'UInt8 Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

data DataType (dType :: Type) where Source #

Data type to represent whether or not the tensor data type is checked, that is, known to the compiler.

Constructors

UncheckedDataType :: forall dType. DataType dType

The tensor data type is unknown to the compiler.

DataType :: forall dType. dType -> DataType dType

The tensor data type is known to the compiler.

Instances

Instances details
Show dType => Show (DataType dType) Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

Methods

showsPrec :: Int -> DataType dType -> ShowS Source #

show :: DataType dType -> String Source #

showList :: [DataType dType] -> ShowS Source #

SingKind (DataType DType) Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

Associated Types

type Demote (DataType DType) = (r :: Type) Source #

SingI dType => SingI ('DataType dType :: DataType DType) Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

Methods

sing :: Sing ('DataType dType) Source #

type Demote (DataType DType) Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

type Sing Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

data SDataType (dataType :: DataType DType) where Source #

Constructors

SUncheckedDataType :: DType -> SDataType 'UncheckedDataType 
SDataType :: forall dType. SDType dType -> SDataType ('DataType dType) 

Instances

Instances details
Show (SDataType dataType) Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

Methods

showsPrec :: Int -> SDataType dataType -> ShowS Source #

show :: SDataType dataType -> String Source #

showList :: [SDataType dataType] -> ShowS Source #

class KnownDataType (dataType :: DataType DType) where Source #

Instances

Instances details
KnownDataType ('UncheckedDataType :: DataType DType) Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

KnownDType dType => KnownDataType ('DataType dType) Source # 
Instance details

Defined in Torch.GraduallyTyped.DType

type family GetDataTypes f where ... Source #

Equations

GetDataTypes (a :: DataType DType) = '[a] 
GetDataTypes (f g) = Concat (GetDataTypes f) (GetDataTypes g) 
GetDataTypes _ = '[]