{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# OPTIONS_HADDOCK hide, prune, not-home #-}
module MLIR.AST.Dialect.Generated.LinalgStructured where
import Prelude (Int, Double, Maybe(..), Bool(..), (++), (<$>), ($), (<>), Show)
import qualified Prelude
import Data.Int (Int64)
import qualified Data.Maybe
import Data.Array (Ix)
import qualified Data.Array.IArray as IArray
import qualified Data.ByteString as BS
import qualified Data.Map.Strict as M
import qualified Control.Monad
import MLIR.AST ( Attribute(..), Type(..), AbstractOperation(..), ResultTypes(..)
, Location(..), Signedness(..), DenseElements(..)
, NamedAttributes, Name
, pattern NoAttrs )
import qualified MLIR.AST as AST
import MLIR.AST.Builder (Value, EndOfBlock, MonadBlockBuilder, RegionBuilderT)
import qualified MLIR.AST.Builder as AST
import qualified MLIR.AST.IStorableArray as AST
import qualified MLIR.AST.PatternUtil as PatternUtil
import qualified MLIR.AST.Dialect.Affine as Affine
abs :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
abs :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
abs [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.abs"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
add :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
add :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
add [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.add"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
batch_matmul :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
batch_matmul :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
batch_matmul [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.batch_matmul"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
batch_matmul_transpose_a :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
batch_matmul_transpose_a :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
batch_matmul_transpose_a [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.batch_matmul_transpose_a"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
batch_matmul_transpose_b :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
batch_matmul_transpose_b :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
batch_matmul_transpose_b [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.batch_matmul_transpose_b"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
batch_matvec :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
batch_matvec :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
batch_matvec [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.batch_matvec"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
batch_mmt4d :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
batch_mmt4d :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
batch_mmt4d [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.batch_mmt4d"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
batch_reduce_matmul :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
batch_reduce_matmul :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
batch_reduce_matmul [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.batch_reduce_matmul"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
batch_vecmat :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
batch_vecmat :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
batch_vecmat [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.batch_vecmat"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
ceil :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
ceil :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
ceil [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.ceil"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
pattern InternalContractOpAttributes :: () => () => [Affine.Map] -> NamedAttributes
pattern $bInternalContractOpAttributes :: [Map] -> Map Name Attribute
$mInternalContractOpAttributes :: forall r. Map Name Attribute -> ([Map] -> r) -> (Void# -> r) -> r
InternalContractOpAttributes indexing_maps_ <- ((\m -> (M.lookup "indexing_maps" m)) -> (Just (PatternUtil.AffineMapArrayAttr indexing_maps_)))
where InternalContractOpAttributes [Map]
indexing_maps_ = [(Name, Attribute)] -> Map Name Attribute
forall k a. Ord k => [(k, a)] -> Map k a
M.fromList ([(Name, Attribute)] -> Map Name Attribute)
-> [(Name, Attribute)] -> Map Name Attribute
forall a b. (a -> b) -> a -> b
$ [(Name
"indexing_maps", [Map] -> Attribute
PatternUtil.AffineMapArrayAttr [Map]
indexing_maps_)]
contract :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> [Affine.Map] -> RegionBuilderT m () -> m Value
contract :: [Type]
-> [Value] -> [Value] -> [Map] -> RegionBuilderT m () -> m Value
contract [Type]
ty0 [Value]
inputs_ [Value]
outputs_ [Map]
indexing_maps_ RegionBuilderT m ()
combiner_Builder = do
Region
combiner_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
combiner_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.contract"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
combiner_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = ([Map] -> Map Name Attribute
InternalContractOpAttributes [Map]
indexing_maps_)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
conv_1d_ncw_fcw :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_1d_ncw_fcw :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_1d_ncw_fcw [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.conv_1d_ncw_fcw"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
conv_1d_nwc_wcf :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_1d_nwc_wcf :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_1d_nwc_wcf [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.conv_1d_nwc_wcf"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
conv_1d :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_1d :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_1d [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.conv_1d"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
conv_2d_nchw_fchw :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_2d_nchw_fchw :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_2d_nchw_fchw [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.conv_2d_nchw_fchw"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
conv_2d_nchw_fchw_q :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_2d_nchw_fchw_q :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_2d_nchw_fchw_q [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.conv_2d_nchw_fchw_q"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
conv_2d_ngchw_fgchw :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_2d_ngchw_fgchw :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_2d_ngchw_fgchw [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.conv_2d_ngchw_fgchw"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
conv_2d_ngchw_gfchw :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_2d_ngchw_gfchw :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_2d_ngchw_gfchw [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.conv_2d_ngchw_gfchw"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
conv_2d_ngchw_gfchw_q :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_2d_ngchw_gfchw_q :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_2d_ngchw_gfchw_q [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.conv_2d_ngchw_gfchw_q"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
conv_2d_nhwc_fhwc :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_2d_nhwc_fhwc :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_2d_nhwc_fhwc [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.conv_2d_nhwc_fhwc"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
conv_2d_nhwc_fhwc_q :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_2d_nhwc_fhwc_q :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_2d_nhwc_fhwc_q [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.conv_2d_nhwc_fhwc_q"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
conv_2d_nhwc_hwcf :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_2d_nhwc_hwcf :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_2d_nhwc_hwcf [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.conv_2d_nhwc_hwcf"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
conv_2d_nhwc_hwcf_q :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_2d_nhwc_hwcf_q :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_2d_nhwc_hwcf_q [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.conv_2d_nhwc_hwcf_q"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
conv_2d_nhwgc_gfhwc :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_2d_nhwgc_gfhwc :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_2d_nhwgc_gfhwc [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.conv_2d_nhwgc_gfhwc"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
conv_2d_nhwgc_gfhwc_q :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_2d_nhwgc_gfhwc_q :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_2d_nhwgc_gfhwc_q [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.conv_2d_nhwgc_gfhwc_q"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
conv_2d :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_2d :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_2d [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.conv_2d"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
conv_3d_ncdhw_fcdhw :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_3d_ncdhw_fcdhw :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_3d_ncdhw_fcdhw [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.conv_3d_ncdhw_fcdhw"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
conv_3d_ndhwc_dhwcf :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_3d_ndhwc_dhwcf :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_3d_ndhwc_dhwcf [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.conv_3d_ndhwc_dhwcf"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
conv_3d_ndhwc_dhwcf_q :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_3d_ndhwc_dhwcf_q :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_3d_ndhwc_dhwcf_q [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.conv_3d_ndhwc_dhwcf_q"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
conv_3d :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_3d :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
conv_3d [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.conv_3d"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
copy :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
copy :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
copy [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.copy"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
depthwise_conv_1d_ncw_cw :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
depthwise_conv_1d_ncw_cw :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
depthwise_conv_1d_ncw_cw [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.depthwise_conv_1d_ncw_cw"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
depthwise_conv_1d_nwc_wc :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
depthwise_conv_1d_nwc_wc :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
depthwise_conv_1d_nwc_wc [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.depthwise_conv_1d_nwc_wc"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
depthwise_conv_1d_nwc_wcm :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
depthwise_conv_1d_nwc_wcm :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
depthwise_conv_1d_nwc_wcm [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.depthwise_conv_1d_nwc_wcm"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
depthwise_conv_2d_nchw_chw :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
depthwise_conv_2d_nchw_chw :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
depthwise_conv_2d_nchw_chw [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.depthwise_conv_2d_nchw_chw"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
depthwise_conv_2d_nhwc_hwc :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
depthwise_conv_2d_nhwc_hwc :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
depthwise_conv_2d_nhwc_hwc [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.depthwise_conv_2d_nhwc_hwc"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
depthwise_conv_2d_nhwc_hwc_q :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
depthwise_conv_2d_nhwc_hwc_q :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
depthwise_conv_2d_nhwc_hwc_q [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.depthwise_conv_2d_nhwc_hwc_q"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
depthwise_conv_2d_nhwc_hwcm :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
depthwise_conv_2d_nhwc_hwcm :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
depthwise_conv_2d_nhwc_hwcm [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.depthwise_conv_2d_nhwc_hwcm"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
depthwise_conv_2d_nhwc_hwcm_q :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
depthwise_conv_2d_nhwc_hwcm_q :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
depthwise_conv_2d_nhwc_hwcm_q [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.depthwise_conv_2d_nhwc_hwcm_q"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
depthwise_conv_3d_ncdhw_cdhw :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
depthwise_conv_3d_ncdhw_cdhw :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
depthwise_conv_3d_ncdhw_cdhw [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.depthwise_conv_3d_ncdhw_cdhw"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
depthwise_conv_3d_ndhwc_dhwc :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
depthwise_conv_3d_ndhwc_dhwc :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
depthwise_conv_3d_ndhwc_dhwc [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.depthwise_conv_3d_ndhwc_dhwc"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
depthwise_conv_3d_ndhwc_dhwcm :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
depthwise_conv_3d_ndhwc_dhwcm :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
depthwise_conv_3d_ndhwc_dhwcm [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.depthwise_conv_3d_ndhwc_dhwcm"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
div :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
div :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
div [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.div"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
div_unsigned :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
div_unsigned :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
div_unsigned [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.div_unsigned"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
dot :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
dot :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
dot [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.dot"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
elemwise_binary :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
elemwise_binary :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
elemwise_binary [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.elemwise_binary"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
elemwise_unary :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
elemwise_unary :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
elemwise_unary [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.elemwise_unary"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
erf :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
erf :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
erf [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.erf"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
exp :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
exp :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
exp [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.exp"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
fill :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
fill :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
fill [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.fill"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
fill_rng_2d :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
fill_rng_2d :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
fill_rng_2d [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.fill_rng_2d"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
floor :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
floor :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
floor [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.floor"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
log :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
log :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
log [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.log"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
map :: () => MonadBlockBuilder m => [Type] -> [Value] -> Value -> RegionBuilderT m () -> m Value
map :: [Type] -> [Value] -> Value -> RegionBuilderT m () -> m Value
map [Type]
ty0 [Value]
inputs_ Value
init_ RegionBuilderT m ()
mapper_Builder = do
Region
mapper_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
mapper_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.map"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ [(Value -> Name
AST.operand Value
init_)])
, opRegions :: [Region]
opRegions = [Region
mapper_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
}))
pattern OptionalAffineMapArrayAttr :: Maybe [Affine.Map] -> Maybe Attribute
pattern $bOptionalAffineMapArrayAttr :: Maybe [Map] -> Maybe Attribute
$mOptionalAffineMapArrayAttr :: forall r.
Maybe Attribute -> (Maybe [Map] -> r) -> (Void# -> r) -> r
OptionalAffineMapArrayAttr x <- ((\case Just (PatternUtil.AffineMapArrayAttr y) -> Just y; Nothing -> Nothing) -> x)
where OptionalAffineMapArrayAttr Maybe [Map]
x = case Maybe [Map]
x of Just [Map]
y -> Attribute -> Maybe Attribute
forall a. a -> Maybe a
Just ([Map] -> Attribute
PatternUtil.AffineMapArrayAttr [Map]
y); Maybe [Map]
Nothing -> Maybe Attribute
forall a. Maybe a
Nothing
pattern InternalMatmulOpAttributes :: () => () => Maybe [Affine.Map] -> NamedAttributes
pattern $bInternalMatmulOpAttributes :: Maybe [Map] -> Map Name Attribute
$mInternalMatmulOpAttributes :: forall r.
Map Name Attribute -> (Maybe [Map] -> r) -> (Void# -> r) -> r
InternalMatmulOpAttributes indexing_maps_ <- ((\m -> (M.lookup "indexing_maps" m)) -> (OptionalAffineMapArrayAttr indexing_maps_))
where InternalMatmulOpAttributes Maybe [Map]
indexing_maps_ = [(Name, Attribute)] -> Map Name Attribute
forall k a. Ord k => [(k, a)] -> Map k a
M.fromList ([(Name, Attribute)] -> Map Name Attribute)
-> [(Name, Attribute)] -> Map Name Attribute
forall a b. (a -> b) -> a -> b
$ (Maybe (Name, Attribute) -> [(Name, Attribute)]
forall a. Maybe a -> [a]
Data.Maybe.maybeToList (Maybe (Name, Attribute) -> [(Name, Attribute)])
-> Maybe (Name, Attribute) -> [(Name, Attribute)]
forall a b. (a -> b) -> a -> b
$ (Name
"indexing_maps",) (Attribute -> (Name, Attribute))
-> Maybe Attribute -> Maybe (Name, Attribute)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Maybe [Map] -> Maybe Attribute
OptionalAffineMapArrayAttr Maybe [Map]
indexing_maps_)
matmul :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> Maybe [Affine.Map] -> RegionBuilderT m () -> m Value
matmul :: [Type]
-> [Value]
-> [Value]
-> Maybe [Map]
-> RegionBuilderT m ()
-> m Value
matmul [Type]
ty0 [Value]
inputs_ [Value]
outputs_ Maybe [Map]
indexing_maps_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.matmul"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Maybe [Map] -> Map Name Attribute
InternalMatmulOpAttributes Maybe [Map]
indexing_maps_)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
matmul_transpose_a :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
matmul_transpose_a :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
matmul_transpose_a [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.matmul_transpose_a"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
matmul_transpose_b :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
matmul_transpose_b :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
matmul_transpose_b [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.matmul_transpose_b"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
matvec :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
matvec :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
matvec [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.matvec"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
max :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
max :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
max [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.max"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
min :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
min :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
min [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.min"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
mmt4d :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
mmt4d :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
mmt4d [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.mmt4d"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
mul :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
mul :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
mul [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.mul"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
negf :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
negf :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
negf [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.negf"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
pooling_nchw_max :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_nchw_max :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_nchw_max [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.pooling_nchw_max"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
pooling_nchw_sum :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_nchw_sum :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_nchw_sum [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.pooling_nchw_sum"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
pooling_ncw_max :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_ncw_max :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_ncw_max [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.pooling_ncw_max"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
pooling_ncw_sum :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_ncw_sum :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_ncw_sum [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.pooling_ncw_sum"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
pooling_ndhwc_max :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_ndhwc_max :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_ndhwc_max [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.pooling_ndhwc_max"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
pooling_ndhwc_min :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_ndhwc_min :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_ndhwc_min [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.pooling_ndhwc_min"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
pooling_ndhwc_sum :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_ndhwc_sum :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_ndhwc_sum [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.pooling_ndhwc_sum"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
pooling_nhwc_max :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_nhwc_max :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_nhwc_max [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.pooling_nhwc_max"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
pooling_nhwc_max_unsigned :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_nhwc_max_unsigned :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_nhwc_max_unsigned [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.pooling_nhwc_max_unsigned"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
pooling_nhwc_min :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_nhwc_min :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_nhwc_min [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.pooling_nhwc_min"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
pooling_nhwc_min_unsigned :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_nhwc_min_unsigned :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_nhwc_min_unsigned [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.pooling_nhwc_min_unsigned"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
pooling_nhwc_sum :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_nhwc_sum :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_nhwc_sum [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.pooling_nhwc_sum"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
pooling_nwc_max :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_nwc_max :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_nwc_max [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.pooling_nwc_max"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
pooling_nwc_max_unsigned :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_nwc_max_unsigned :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_nwc_max_unsigned [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.pooling_nwc_max_unsigned"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
pooling_nwc_min :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_nwc_min :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_nwc_min [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.pooling_nwc_min"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
pooling_nwc_min_unsigned :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_nwc_min_unsigned :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_nwc_min_unsigned [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.pooling_nwc_min_unsigned"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
pooling_nwc_sum :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_nwc_sum :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
pooling_nwc_sum [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.pooling_nwc_sum"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
powf :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
powf :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
powf [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.powf"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
quantized_batch_matmul :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
quantized_batch_matmul :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
quantized_batch_matmul [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.quantized_batch_matmul"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
quantized_matmul :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
quantized_matmul :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
quantized_matmul [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.quantized_matmul"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
reciprocal :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
reciprocal :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
reciprocal [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.reciprocal"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
round :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
round :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
round [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.round"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
rsqrt :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
rsqrt :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
rsqrt [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.rsqrt"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
select :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
select :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
select [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.select"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
sqrt :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
sqrt :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
sqrt [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.sqrt"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
square :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
square :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
square [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.square"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
sub :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
sub :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
sub [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.sub"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
tanh :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
tanh :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
tanh [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.tanh"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))
vecmat :: () => MonadBlockBuilder m => [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
vecmat :: [Type] -> [Value] -> [Value] -> RegionBuilderT m () -> m Value
vecmat [Type]
ty0 [Value]
inputs_ [Value]
outputs_ RegionBuilderT m ()
region_Builder = do
Region
region_ <- RegionBuilderT m () -> m Region
forall (m :: * -> *). Monad m => RegionBuilderT m () -> m Region
AST.buildRegion RegionBuilderT m ()
region_Builder
([Value] -> Value) -> m [Value] -> m Value
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
Control.Monad.liftM [Value] -> Value
forall a. [a] -> a
Prelude.head (Operation -> m [Value]
forall (m :: * -> *). MonadBlockBuilder m => Operation -> m [Value]
AST.emitOp (Operation :: forall operand.
Name
-> Location
-> ResultTypes
-> [operand]
-> [Region]
-> [Name]
-> Map Name Attribute
-> AbstractOperation operand
Operation
{ opName :: Name
opName = Name
"linalg.vecmat"
, opLocation :: Location
opLocation = Location
UnknownLocation
, opResultTypes :: ResultTypes
opResultTypes = [Type] -> ResultTypes
Explicit ([Type]
ty0)
, opOperands :: [Name]
opOperands = (([Value] -> [Name]
AST.operands [Value]
inputs_) [Name] -> [Name] -> [Name]
forall a. [a] -> [a] -> [a]
++ ([Value] -> [Name]
AST.operands [Value]
outputs_))
, opRegions :: [Region]
opRegions = [Region
region_]
, opSuccessors :: [Name]
opSuccessors = []
, opAttributes :: Map Name Attribute
opAttributes = (Map Name Attribute
NoAttrs)
Map Name Attribute -> Map Name Attribute -> Map Name Attribute
forall a. Semigroup a => a -> a -> a
<> Name -> Attribute -> Map Name Attribute
AST.namedAttribute Name
"operand_segment_sizes"
(Type -> DenseElements -> Attribute
DenseElementsAttr ([Int] -> Type -> Type
VectorType [Int
2] (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Signedness -> UInt -> Type
IntegerType Signedness
Unsigned UInt
32) (DenseElements -> Attribute) -> DenseElements -> Attribute
forall a b. (a -> b) -> a -> b
$
IStorableArray Int Word32 -> DenseElements
forall i.
(Show i, Ix i) =>
IStorableArray i Word32 -> DenseElements
DenseUInt32 (IStorableArray Int Word32 -> DenseElements)
-> IStorableArray Int Word32 -> DenseElements
forall a b. (a -> b) -> a -> b
$ (Int, Int) -> [Word32] -> IStorableArray Int Word32
forall (a :: * -> * -> *) e i.
(IArray a e, Ix i) =>
(i, i) -> [e] -> a i e
IArray.listArray (Int
1 :: Int, Int
2) ([Word32] -> IStorableArray Int Word32)
-> [Word32] -> IStorableArray Int Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (Int -> Word32) -> [Int] -> [Word32]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [[Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
inputs_), [Name] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Prelude.length ([Value] -> [Name]
AST.operands [Value]
outputs_)])
}))