diff --git a/.timedata/f32_fast_kernel.json b/.timedata/f32_fast_kernel.json new file mode 100644 index 000000000..6ac99f796 --- /dev/null +++ b/.timedata/f32_fast_kernel.json @@ -0,0 +1 @@ +{"avg": 1.203106, "stddev": 0.008578116576498592, "times": [1.21923, 1.19135, 1.20671, 1.19214, 1.20526, 1.20393, 1.2009, 1.2122, 1.2063, 1.19304]} \ No newline at end of file diff --git a/.timedata/f64_fast_kernel.json b/.timedata/f64_fast_kernel.json new file mode 100644 index 000000000..3264c8d44 --- /dev/null +++ b/.timedata/f64_fast_kernel.json @@ -0,0 +1 @@ +{"avg": 1.2119130000000002, "stddev": 0.005646131507501363, "times": [1.22538, 1.21134, 1.21124, 1.20609, 1.2136, 1.21643, 1.2142, 1.20709, 1.20729, 1.20647]} \ No newline at end of file diff --git a/.timedata/f64_old_kernel.json b/.timedata/f64_old_kernel.json new file mode 100644 index 000000000..5eef8380a --- /dev/null +++ b/.timedata/f64_old_kernel.json @@ -0,0 +1 @@ +{"avg": 1.9952400000000001, "stddev": 0.005532747961004563, "times": [2.00349, 2.00492, 1.99984, 1.99339, 1.98599, 1.99134, 1.99441, 1.99439, 1.9928, 1.99183]} \ No newline at end of file diff --git a/.timedata/old.json b/.timedata/old.json new file mode 100644 index 000000000..2d17a0f82 --- /dev/null +++ b/.timedata/old.json @@ -0,0 +1 @@ +{"avg": 2.000039, "stddev": 0.024113097042893505, "times": [1.99821, 2.0665, 1.9849, 1.98276, 1.98553, 1.99033, 1.99006, 2.01721, 1.99753, 1.98736]} \ No newline at end of file diff --git a/MNISTNet.chpl b/MNISTNet.chpl index a97eed447..9bcf02596 100644 --- a/MNISTNet.chpl +++ b/MNISTNet.chpl @@ -9,6 +9,8 @@ import Time; config param layerDebug = false; +type dtype = real(32); + class CNN : Module(?) { var conv1: owned Conv2D(eltType); var conv2: owned Conv2D(eltType); @@ -18,7 +20,7 @@ class CNN : Module(?) { var fc1: owned Linear(eltType); var fc2: owned Linear(eltType); - proc init(type eltType = real) { + proc init(type eltType = dtype) { super.init(eltType); // (1,3,3) x 32 this.conv1 = new Conv2D(eltType,channels=1,features=32,kernel=3,stride=1); // (1,X,X) -> (32,Y,Y) @@ -142,13 +144,17 @@ if diag { } -var cnn = new CNN(real); +var cnn = new CNN(dtype); for (n,m) in cnn.moduleFields() { writeln(n); } +var model = Network.loadModel(specFile="scripts/models/cnn/specification.json", + weightsFolder="scripts/models/cnn/", + dtype=dtype); + config const testImgSize = 28; @@ -167,7 +173,7 @@ cnn.loadPyTorchDump(modelPath); config const imageCount = 0; -var images = forall i in 0..= 1 then here.gpus[0] else here + .. data:: config var containedValue .. class:: Remote : serializable - .. attribute:: type eltType + .. type:: config type eltType - .. attribute:: var device: locale = defaultDevice - - .. attribute:: var item: _remoteVarWrapper(eltType) - - .. method:: proc init(item: ?eltType, device: locale = defaultDevice) - - .. method:: proc init(type eltType, device: locale = defaultDevice) - - .. method:: proc to(device_: locale) + .. data:: config var value: owned(_RemoteVarContainer(eltType)) .. method:: proc ref get() ref - .. method:: proc serialize(writer, serializer) + .. method:: proc ptr ref -.. record:: remote : serializable + .. method:: proc device: locale - .. attribute:: type eltType + .. method:: proc init(in value: owned(_RemoteVarContainer(?eltType))) - .. attribute:: var remoteResource: shared Remote(eltType) + .. method:: proc init(value: ?eltType, device: locale = Remote.defaultDevice) where !isSubtype(eltType, Remote(?)) - .. method:: proc init(type eltType, device: locale = defaultDevice) + .. method:: proc init(type eltType, in tr: _thunkRecord, device: locale = Remote.defaultDevice) - .. method:: proc init(item: ?eltType, device: locale = defaultDevice) + .. method:: proc init(type eltType, device: locale = Remote.defaultDevice) - .. method:: proc device ref + .. method:: proc copyContainer(dest: locale = device): owned(_RemoteVarContainer(eltType)) - .. method:: proc ref get() ref + .. method:: proc copyTo(dest: locale = device): owned(Remote(eltType)) - .. method:: proc to(device_: locale) + .. method:: proc copy(): owned(Remote(eltType)) - .. method:: proc copy(): remote(eltType) + .. method:: proc to(dest: locale) - .. method:: proc ref access() ref +.. method:: proc ref (owned(Remote(?eltType))).get() ref: owned(Remote(eltType)) - .. method:: proc localAccess() ref +.. method:: proc ref (shared Remote(?eltType)).get() ref: shared Remote(eltType) - .. method:: proc download(): eltType +.. method:: proc ref (unmanaged(Remote(?eltType))).get() ref: unmanaged(Remote(eltType)) - .. method:: proc ref unload(): eltType +.. method:: proc type Remote.defaultDevice: locale diff --git a/docs/_sources/modules/lib/SimpleDomain.rst.txt b/docs/_sources/modules/lib/SimpleDomain.rst.txt index d09231bc9..f80d8429b 100644 --- a/docs/_sources/modules/lib/SimpleDomain.rst.txt +++ b/docs/_sources/modules/lib/SimpleDomain.rst.txt @@ -21,11 +21,11 @@ or .. record:: rect - .. attribute:: param rank: int + .. data:: config param rank: int - .. attribute:: var shape: rank*int + .. data:: config var shape: rank*int - .. attribute:: var offset: rank*int = zeroTup(rank) + .. data:: config var offset: rank*int = zeroTup(rank) .. method:: proc init(shape: int ...?rank) diff --git a/docs/_sources/modules/lib/StaticTensor.rst.txt b/docs/_sources/modules/lib/StaticTensor.rst.txt index bc137289a..f8e300244 100644 --- a/docs/_sources/modules/lib/StaticTensor.rst.txt +++ b/docs/_sources/modules/lib/StaticTensor.rst.txt @@ -19,11 +19,11 @@ or .. record:: tensor : serializable - .. attribute:: param rank: int + .. data:: config param rank: int - .. attribute:: type eltType = real(64) + .. type:: config type eltType = real(64) - .. attribute:: var resource: shared BaseTensorResource(eltType, rank) + .. data:: config var resource: shared BaseTensorResource(eltType, rank) .. method:: proc meta @@ -31,9 +31,11 @@ or .. method:: proc init(param rank: int, type eltType = real(64)) - .. method:: proc init(resource: shared BaseTensorResource(?eltType, ?rank), param strict: bool = false) + .. method:: proc init(in resource: shared BaseTensorResource(?eltType, ?rank)) - .. method:: proc init(nda: ndarray(?rank, ?eltType)) + .. method:: proc init(in resource: owned(BaseTensorResource(?eltType, ?rank))) + + .. method:: proc init(array: ndarray(?rank, ?eltType)) .. method:: proc init(dom: domain(?), type eltType = real) @@ -47,6 +49,10 @@ or .. method:: proc _setArrayData(value) + .. method:: proc detach(copy: bool = true, keepGrad: bool = false): tensor(rank, eltType) + +.. function:: operator :(in t: tensor(?rank, ?eltType), type toType): tensor(rank, toType) + .. function:: proc tensorFromCtx(param rank: int, type eltType, ctx): tensor(rank, eltType) .. function:: operator +(a: tensor(?rank, ?eltType), b: tensor(rank, eltType)) @@ -105,7 +111,7 @@ or .. method:: proc type tensor.arange(shape: int ...?rank): tensor(rank, real) -.. method:: proc type tensor.fromShape(type eltType = real, shape: int ...?rank, value: eltType = 0: eltType): tensor(rank, eltType) +.. method:: proc type tensor.fromShape(type eltType = real, shape: int ...?rank, value: eltType = 0 : eltType): tensor(rank, eltType) .. method:: proc type tensor.zeros(shape: int ...?rank): tensor(rank, real) @@ -115,11 +121,11 @@ or .. method:: proc type tensor.ones(type eltType, shape: int ...?rank): tensor(rank, eltType) -.. data:: config const n = 100 +.. data:: const n = 100 -.. data:: config const diag = false +.. data:: const diag = false -.. data:: config const size = 3 +.. data:: const size = 3 .. function:: proc main() diff --git a/docs/_sources/modules/lib/Utilities.rst.txt b/docs/_sources/modules/lib/Utilities.rst.txt index 349931298..a4c980afd 100644 --- a/docs/_sources/modules/lib/Utilities.rst.txt +++ b/docs/_sources/modules/lib/Utilities.rst.txt @@ -25,7 +25,9 @@ or Utilities/* -.. data:: config param loopGpuSupport = false +.. data:: param loopGpuSupport = CHPL_LOCALE_MODEL == "gpu" + +.. function:: proc targetGpu() param: bool .. data:: param debugPrint = false diff --git a/docs/_sources/modules/lib/Utilities/Standard.rst.txt b/docs/_sources/modules/lib/Utilities/Standard.rst.txt index 456de407a..6e69a1a21 100644 --- a/docs/_sources/modules/lib/Utilities/Standard.rst.txt +++ b/docs/_sources/modules/lib/Utilities/Standard.rst.txt @@ -57,9 +57,11 @@ or .. method:: proc _domain.fastShape +.. method:: proc _domain.fastNormalDims + .. method:: proc _domain.myShape -.. method:: proc _domain.normalize: this.type where this.isRectangular() +.. method:: proc _domain.normalize where this.isRectangular() .. method:: proc _domain.isNormal: bool where this.isRectangular() diff --git a/docs/_sources/modules/lib/Utilities/Types.rst.txt b/docs/_sources/modules/lib/Utilities/Types.rst.txt index 8d9d26264..6a5c7c941 100644 --- a/docs/_sources/modules/lib/Utilities/Types.rst.txt +++ b/docs/_sources/modules/lib/Utilities/Types.rst.txt @@ -19,3 +19,7 @@ or .. type:: type stdRange = range(idxType = int, bounds = boundKind.both, strides = strideKind.one) +.. type:: type f32 = real(32) + +.. type:: type f64 = real(64) + diff --git a/docs/genindex.html b/docs/genindex.html index 34adf0882..897727184 100644 --- a/docs/genindex.html +++ b/docs/genindex.html @@ -128,7 +128,7 @@

Symbols

  • +() (in module DynamicTensor)
  • -
  • :() (in module DynamicTensor) +
  • :() (in module DynamicTensor), [1]
  • -
  • =() (in module NDArray), [1], [2], [3] +
  • =() (in module NDArray), [1]
  • @@ -165,23 +167,29 @@

    Symbols

    _

    - +
    @@ -189,13 +197,19 @@

    _

    A

    -
  • arg (Autograd.padOp attribute) - -
  • argmax() (DynamicTensor.Tensor method) @@ -227,26 +235,24 @@

    A

  • (DynamicTensor.Tensor method)
  • -
  • arrayResource (NDArray.ndarray attribute) -
  • @@ -301,27 +301,23 @@

    B

  • (Autograd.sliceOp method)
  • (Autograd.sumOp method) -
  • -
  • (Autograd.TensorResource method), [1]
  • @@ -339,14 +335,14 @@

    C

  • (in module Autograd)
  • -
  • childDict (Network.moduleChildren attribute) -
  • children() (Autograd.addOp method)
  • @@ -378,8 +380,24 @@

    C

  • contract() (NDArray.ndarray method)
  • Conv2D (class in Network) +
  • +
  • Conv2D.bias (in module Network) +
  • +
  • Conv2D.kernel (in module Network) +
  • +
  • Conv2D.kernelShape (in module Network) +
  • +
  • Conv2D.stride (in module Network)
  • conv2DOp (record in Autograd) +
  • +
  • conv2DOp.eltType (in module Autograd) +
  • +
  • conv2DOp.features (in module Autograd) +
  • +
  • conv2DOp.kernel (in module Autograd) +
  • +
  • conv2DOp.stride (in module Autograd)
  • convolve() (DynamicTensor.Tensor method), [1] @@ -389,7 +407,11 @@

    C

  • (StaticTensor.tensor method), [1]
  • -
  • copy() (Remote.remote method) +
  • copy() (Remote.Remote method) +
  • +
  • copyContainer() (Remote.Remote method) +
  • +
  • copyTo() (Remote.Remote method)
  • countOccurrences() (Standard.string method)
  • @@ -399,49 +421,49 @@

    C

    D

    - + - +
  • divOp (record in Autograd)
  • -
  • dom (Autograd.sliceOp attribute) +
  • divOp.lhs (in module Autograd)
  • -
  • domainFromShape() (in module Utilities) +
  • divOp.rhs (in module Autograd)
  • -
  • download() (Remote.remote method) +
  • domainFromShape() (in module Utilities)
  • drop() (in module NDArray) @@ -481,54 +503,6 @@

    E

  • einsum() (NDArray.ndarray method)
  • -
  • eltType (Autograd.addOp attribute) - -
  • -
    +
    @@ -565,11 +549,15 @@

    E

    F

      -
    • Linear (class in Network) +
    • Linear.m (in module Network)
    • load() (DynamicTensor.Tensor method)
    • loadFromNumpy() (DynamicTensor.Tensor method) +
    • +
    • loadModel() (in module Network)
    • LoadNumpy (module)
    • loadNumpyArray() (in module LoadNumpy)
    • loadPyTorchDump() (Network.Module method) -
    • -
    • localAccess() (Remote.remote method)
    • loopGpuSupport (in module Utilities)
    • @@ -883,8 +819,6 @@

      L

      M

      - + - +
    • maxOp (record in Autograd) +
    • +
    • maxOp.axes (in module Autograd) +
    • +
    • maxOp.eltType (in module Autograd) +
    • +
    • maxOp.input (in module Autograd) +
    • +
    • maxOp.maxRank (in module Autograd) +
    • +
    • maxOp.rank (in module Autograd)
    • MaxPool (class in Network)
    • @@ -939,17 +879,9 @@

      M

    • (StaticTensor.tensor method)
    • -
    • reluOp (record in Autograd) +
    • +
      -
    • remote (record in Remote) +
    • Remote.eltType (in module Remote)
    • -
    • remoteResource (Remote.remote attribute) +
    • Remote.value (in module Remote)
    • removeIdx() (Standard._tuple method)
    • @@ -1217,25 +1159,17 @@

      R

    • reshapeOp (record in Autograd)
    • -
    • resource (StaticTensor.tensor attribute) +
    • reshapeOp.eltType (in module Autograd)
    • -
    • resource() (DynamicTensor.Tensor method) - -
    • -
    • rhs (Autograd.addOp attribute) - -
    • -
    • runtimeRank (DynamicTensor.Tensor attribute) +
    • resource() (DynamicTensor.Tensor method)
    • runtimeRank() (Autograd.BaseTensorResource method) @@ -1252,33 +1186,29 @@

      S

    • save() (DynamicTensor.Tensor method)
    • Sequential (class in Network) +
    • +
    • Sequential.mds (in module Network)
    • serialize() (DynamicTensor.Tensor method), [1]
    • setData() (NDArray.ndarray method)
    • -
    • setup() (Network.Conv2D method) +
    • setup() (in module Network)
    • -
    • shape (Autograd.reshapeOp attribute) - -
    • shrink() (NDArray.ndarray method)
        @@ -1286,6 +1216,14 @@

        S

    • shrinkOp (record in Autograd) +
    • +
    • shrinkOp.arg (in module Autograd) +
    • +
    • shrinkOp.eltType (in module Autograd) +
    • +
    • shrinkOp.input (in module Autograd) +
    • +
    • shrinkOp.rank (in module Autograd)
    • signature() (Network.Module method)
    • @@ -1318,6 +1256,14 @@

      S

    • sliceGeneric() (in module NDArray)
    • sliceOp (record in Autograd) +
    • +
    • sliceOp.dom (in module Autograd) +
    • +
    • sliceOp.eltType (in module Autograd) +
    • +
    • sliceOp.input (in module Autograd) +
    • +
    • sliceOp.rank (in module Autograd)
    • Softmax (class in Network)
    • @@ -1337,21 +1283,11 @@

      S

    • stdRange (in module Types)
    • -
    • stride (Autograd.conv2DOp attribute) - -
    • -
    • subModuleOrder (Network.ModuleSpecification attribute) +
    • subOp (record in Autograd)
    • -
    • subModules (Network.Module attribute) - -
    • -
    • subOp (record in Autograd) +
    • subOp.rhs (in module Autograd)
    • sum() (DynamicTensor.Tensor method) @@ -1367,7 +1303,15 @@

      S

    • sumOp (record in Autograd)
    • -
    • sumRank (Autograd.sumOp attribute) +
    • sumOp.axes (in module Autograd) +
    • +
    • sumOp.eltType (in module Autograd) +
    • +
    • sumOp.input (in module Autograd) +
    • +
    • sumOp.rank (in module Autograd) +
    • +
    • sumOp.sumRank (in module Autograd)
    • @@ -1375,8 +1319,6 @@

      S

      T

      + -
    • tensor (record in StaticTensor) +
    • +
    • Tensor.eltType (in module DynamicTensor) +
    • +
    • tensor.eltType (in module StaticTensor) +
    • +
    • Tensor.meta (in module DynamicTensor) +
    • +
    • tensor.rank (in module StaticTensor) +
    • +
    • tensor.resource (in module StaticTensor) +
    • +
    • Tensor.runtimeRank (in module DynamicTensor)
    • TensorEssence (class in Autograd) +
    • +
    • TensorEssence.eltType (in module Autograd)
    • tensorFromCtx() (in module StaticTensor)
    • tensorize() (DynamicTensor.Tensor method)
    • TensorResource (class in Autograd) +
    • +
      -
      • to() (Autograd.BaseTensorResource method)
      • toArray() (DynamicTensor.Tensor method) @@ -1440,6 +1400,8 @@

        T

      • toRemote() (NDArray.ndarray method)
      • toTensor() (DynamicTensor.ndarray method) +
      • +
      • treeHeight() (Autograd.TensorEssence method)
      • Types (module)
      • @@ -1449,8 +1411,6 @@

        T

        U

        @@ -1465,12 +1425,6 @@

        U

        V

        - @@ -1479,7 +1433,7 @@

        V

        W

          diff --git a/docs/modules/lib/Autograd.html b/docs/modules/lib/Autograd.html index 6e2c9783d..6f41a545a 100644 --- a/docs/modules/lib/Autograd.html +++ b/docs/modules/lib/Autograd.html @@ -116,9 +116,9 @@
          class TensorEssence : serializable¶
          -
          +
          -type eltType = real¶
          +config type eltType = real¶
          @@ -126,14 +126,24 @@ proc runtimeRank : int¶
          +
          +
          +iter children() : borrowed TensorEssence(eltType)¶
          +
          + +
          +
          +proc treeHeight() : int¶
          +
          +
          class ForgetfulTensor : TensorEssence¶
          -
          +
          -param rank : int¶
          +config param rank : int¶
          @@ -141,44 +151,44 @@
          class BaseTensorResource : TensorEssence, serializable¶
          -
          +
          -param rank : int¶
          +config param rank : int¶
          -
          +
          -var dataResource : remote(ndarray(rank, eltType))¶
          +config var dataResource : shared Remote(ndarray(rank, eltType))¶
          -
          +
          -var gradResource : remote(ndarray(rank, eltType))¶
          +config var gradResource : shared ?Remote(ndarray(rank, eltType))¶
          -
          -proc to(device_: locale)¶
          +
          +proc init(type eltType, param rank: int)¶
          -
          -proc device : locale¶
          +
          +proc init(in dataResource: shared Remote(ndarray(?rank, ?eltType)), in gradResource: shared ?Remote(ndarray(rank, eltType)) = nil)
          -
          -proc forward()¶
          +
          +proc init(data: ndarray(?rank, ?eltType), device: locale = Remote.defaultDevice)
          -
          -proc backward(grad: remote(ndarray(rank, eltType)), param alreadyPopulated = false)¶
          +
          +proc to(dest: locale)¶
          -
          -proc backward()  where rank == 1
          +
          +proc device : locale¶
          @@ -187,23 +197,28 @@
          -
          -proc data ref : [] eltType¶
          +
          +proc grad ref : ndarray(rank, eltType)¶
          -
          -proc grad ref : ndarray(rank, eltType)¶
          +
          +proc forward()¶
          -
          -proc gradData ref : ndarray(rank, eltType)¶
          +
          +proc backward(grad: remote(ndarray(rank, eltType)), param alreadyPopulated = false)¶
          -
          -proc _loc¶
          +
          +proc backward()  where rank == 1
          +
          + +
          +
          +proc detach(copy: bool = true, keepGrad: bool = false) : owned(TensorResource(eltType, rank, baseValue))¶
          @@ -216,49 +231,49 @@
          class TensorResource : BaseTensorResource(?), serializable¶
          -
          -
          -type operation¶
          +
          +
          +config type operationType¶
          -
          -
          -var operationData : operation¶
          +
          +
          +config var operationCtx : operationType¶
          -proc init(param rank: int, type eltType, type operation)¶
          +proc init(type eltType, param rank: int, operationCtx: ?operationType)¶
          -proc init(param rank: int, type eltType, operationData: ?operation)
          +proc init(in dataResource: shared Remote(ndarray(?rank, ?eltType)), in gradResource: shared ?Remote(ndarray(rank, eltType)) = nil, operationCtx: ?operationType)
          -proc init(ref resource: remote(ndarray(?rank, ?eltType)), operationData: ?operation, device_: locale = defaultDevice)
          +proc init(in dataResource: shared Remote(ndarray(?rank, ?eltType)))
          -proc init(data: ndarray(?rank, ?eltType), operationData: ?operation, device_: locale = defaultDevice)
          +proc init(bt: borrowed BaseTensorResource(?eltType, ?rank), operationCtx: ?operationType)
          -
          -override proc forward()¶
          +
          +override proc detach(copy: bool = true, keepGrad: bool = false) : owned(TensorResource(eltType, rank, baseValue))¶
          -
          -override proc backward(grad: remote(ndarray(rank, eltType)), param alreadyPopulated: bool = false)¶
          +
          +override proc forward()¶
          -
          -
          -override proc backward()  where rank == 1
          +
          +
          +override iter children() : borrowed TensorEssence(eltType)¶
          @@ -281,9 +296,9 @@
          record reluOp : serializable¶
          -
          +
          -var input : shared BaseTensorResource(?)¶
          +config var input : shared BaseTensorResource(?)¶
          @@ -306,9 +321,9 @@
          record expOp : serializable¶
          -
          +
          -var input : shared BaseTensorResource(?)¶
          +config var input : shared BaseTensorResource(?)¶
          @@ -326,24 +341,24 @@
          record addOp : serializable¶
          -
          +
          -param rank : int¶
          +config param rank : int¶
          -
          +
          -type eltType¶
          +config type eltType¶
          -
          +
          -var lhs : shared BaseTensorResource(eltType, rank)¶
          +config var lhs : shared BaseTensorResource(eltType, rank)¶
          -
          +
          -var rhs : shared BaseTensorResource(eltType, rank)¶
          +config var rhs : shared BaseTensorResource(eltType, rank)¶
          @@ -366,14 +381,19 @@
          record subOp : serializable¶
          -
          +
          -var lhs : shared BaseTensorResource(?)¶
          +config var lhs : shared BaseTensorResource(?)¶
          -
          +
          -var rhs : shared BaseTensorResource(?)¶
          +config var rhs : shared BaseTensorResource(?)¶ +
          + +
          +
          +proc children¶
          @@ -386,14 +406,19 @@
          record divOp : serializable¶
          -
          +
          -var lhs : shared BaseTensorResource(?)¶
          +config var lhs : shared BaseTensorResource(?)¶
          -
          +
          -var rhs : shared BaseTensorResource(?)¶
          +config var rhs : shared BaseTensorResource(?)¶ +
          + +
          +
          +proc children¶
          @@ -406,24 +431,24 @@
          record multOp : serializable¶
          -
          +
          -param rank : int¶
          +config param rank : int¶
          -
          +
          -type eltType¶
          +config type eltType¶
          -
          +
          -var lhs : shared BaseTensorResource(eltType, rank)¶
          +config var lhs : shared BaseTensorResource(eltType, rank)¶
          -
          +
          -var rhs : shared BaseTensorResource(eltType, rank)¶
          +config var rhs : shared BaseTensorResource(eltType, rank)¶
          @@ -446,29 +471,29 @@
          record reshapeOp : serializable¶
          -
          +
          -param oldRank : int¶
          +config param oldRank : int¶
          -
          +
          -param newRank : int¶
          +config param newRank : int¶
          -
          +
          -type eltType¶
          +config type eltType¶
          -
          +
          -var shape : newRank*int¶
          +config var shape : newRank*int¶
          -
          +
          -var input : shared BaseTensorResource(eltType, oldRank)¶
          +config var input : shared BaseTensorResource(eltType, oldRank)¶
          @@ -491,24 +516,24 @@
          record permuteOp : serializable¶
          -
          +
          -param rank : int¶
          +config param rank : int¶
          -
          +
          -type eltType = real¶
          +config type eltType = real¶
          -
          +
          -var permutation¶
          +config var permutation¶
          -
          +
          -var input : shared BaseTensorResource(eltType, rank)¶
          +config var input : shared BaseTensorResource(eltType, rank)¶
          @@ -531,24 +556,24 @@
          record expandOp : serializable¶
          -
          +
          -param rank : int¶
          +config param rank : int¶
          -
          +
          -type eltType = real¶
          +config type eltType = real¶
          -
          +
          -var expandedShape : rank*int¶
          +config var expandedShape : rank*int¶
          -
          +
          -var input : shared BaseTensorResource(eltType, rank)¶
          +config var input : shared BaseTensorResource(eltType, rank)¶
          @@ -571,29 +596,29 @@
          record padOp : serializable¶
          -
          +
          -param rank : int¶
          +config param rank : int¶
          -
          +
          -type eltType = real¶
          +config type eltType = real¶
          -
          +
          -var arg : rank*(2*(int))¶
          +config var arg : rank*2*int¶
          -
          +
          -var value : eltType¶
          +config var value : eltType¶
          -
          +
          -var input : shared BaseTensorResource(eltType, rank)¶
          +config var input : shared BaseTensorResource(eltType, rank)¶
          @@ -616,24 +641,24 @@
          record shrinkOp : serializable¶
          -
          +
          -param rank : int¶
          +config param rank : int¶
          -
          +
          -type eltType = real¶
          +config type eltType = real¶
          -
          +
          -var arg : rank*(2*(int))¶
          +config var arg : rank*2*int¶
          -
          +
          -var input : shared BaseTensorResource(eltType, rank)¶
          +config var input : shared BaseTensorResource(eltType, rank)¶
          @@ -656,24 +681,24 @@
          record sliceOp : serializable¶
          -
          +
          -param rank : int¶
          +config param rank : int¶
          -
          +
          -type eltType = real¶
          +config type eltType = real¶
          -
          +
          -var dom : domain(rank, int)¶
          +config var dom : domain(rank, int)¶
          -
          +
          -var input : shared BaseTensorResource(eltType, rank)¶
          +config var input : shared BaseTensorResource(eltType, rank)¶
          @@ -696,29 +721,29 @@
          record layerSliceOp : serializable¶
          -
          +
          -param rank : int¶
          +config param rank : int¶
          -
          +
          -type eltType = real¶
          +config type eltType = real¶
          -
          +
          -var base : shared BaseTensorResource(eltType, rank)¶
          +config var base : shared BaseTensorResource(eltType, rank)¶
          -
          +
          -var mask : shared BaseTensorResource(eltType, rank)¶
          +config var mask : shared BaseTensorResource(eltType, rank)¶
          -
          +
          -var maskDomain : domain(rank, int)¶
          +config var maskDomain : domain(rank, int)¶
          @@ -741,29 +766,29 @@
          record sumOp : serializable¶
          -
          +
          -param rank : int¶
          +config param rank : int¶
          -
          +
          -type eltType = real¶
          +config type eltType = real¶
          -
          +
          -param sumRank : int¶
          +config param sumRank : int¶
          -
          +
          -var axes : sumRank*int¶
          +config var axes : sumRank*int¶
          -
          +
          -var input : shared BaseTensorResource(eltType, rank)¶
          +config var input : shared BaseTensorResource(eltType, rank)¶
          @@ -791,29 +816,29 @@
          record maxOp : serializable¶
          -
          +
          -param rank : int¶
          +config param rank : int¶
          -
          +
          -type eltType = real¶
          +config type eltType = real¶
          -
          +
          -param maxRank : int¶
          +config param maxRank : int¶
          -
          +
          -var axes : maxRank*int¶
          +config var axes : maxRank*int¶
          -
          +
          -var input : shared BaseTensorResource(eltType, rank)¶
          +config var input : shared BaseTensorResource(eltType, rank)¶
          @@ -836,24 +861,24 @@
          record conv2DOp : serializable¶
          -
          +
          -type eltType = real¶
          +config type eltType = real¶
          -
          +
          -var features : shared BaseTensorResource(eltType, 3)¶
          +config var features : shared BaseTensorResource(eltType, 3)¶
          -
          +
          -var kernel : shared BaseTensorResource(eltType, 4)¶
          +config var kernel : shared BaseTensorResource(eltType, 4)¶
          -
          +
          -var stride : int¶
          +config var stride : int¶
          diff --git a/docs/modules/lib/DynamicTensor.html b/docs/modules/lib/DynamicTensor.html index 1574ce327..7fd15180d 100644 --- a/docs/modules/lib/DynamicTensor.html +++ b/docs/modules/lib/DynamicTensor.html @@ -100,25 +100,30 @@
          -config param maxRank = 6¶
          +param maxRank = 6¶ +
          + +
          +
          +param defaultDetachedMode = true¶
          record Tensor : serializable¶
          -
          +
          -type eltType = real¶
          +config type eltType = real¶
          -
          +
          -var meta : shared TensorEssence(eltType)¶
          +config var meta : shared TensorEssence(eltType)¶
          -
          +
          -var runtimeRank : int = -1¶
          +config var runtimeRank : int = -1¶
          @@ -128,17 +133,17 @@
          -proc init(type eltType, meta: shared TensorEssence(eltType))
          +proc init(type eltType, in meta: shared TensorEssence(eltType))
          -proc init(meta: shared TensorEssence(?eltType))
          +proc init(in meta: shared TensorEssence(?eltType))
          -proc init(t: tensor(?rank, ?eltType))
          +proc init(t: tensor(?rank, ?eltType), detached: bool = Tensor.detachMode())
          @@ -221,8 +226,28 @@ proc toArray(param rank: int) : [] eltType¶
          +
          +
          +proc detach() : Tensor(eltType)¶
          +
          +
          +
          +
          +operator :(in t: Tensor(?eltType), type toType) : Tensor(toType)¶
          +
          + +
          +
          +proc type Tensor.detachMode() param : bool¶
          +
          + +
          +
          +proc type Tensor.detachMode(detachMode: bool)
          +
          +
          proc ndarray.toTensor() : Tensor(eltType)¶
          @@ -230,12 +255,12 @@
          -proc tensor.eraseRank() : Tensor(eltType)¶
          +proc tensor.eraseRank(detach: bool = Tensor.detachMode()) : Tensor(eltType)¶
          -
          -operator :(t: tensor(?rank, ?eltType), type T: Tensor(eltType)) : Tensor(eltType)¶
          +
          +operator :(t: tensor(?rank, ?eltType), type T: Tensor(eltType)) : Tensor(eltType)
          diff --git a/docs/modules/lib/LoadNumpy.html b/docs/modules/lib/LoadNumpy.html index 9dfd76929..9e78b33cd 100644 --- a/docs/modules/lib/LoadNumpy.html +++ b/docs/modules/lib/LoadNumpy.html @@ -106,26 +106,26 @@
          class ArrClass : NoRankArray¶
          -
          +
          -param rank : int¶
          +config param rank : int¶
          -
          +
          -var _domain : domain(rank, int)¶
          +config var _domain : domain(rank, int)¶
          -
          +
          -var data : [_domain] real¶
          +config var data : [_domain] real¶
          -proc readData(param rank: int, fr, shape: rank*int, dtype: bytes) : owned NoRankArray¶
          +proc readData(param rank: int, fr, shape: rank*int, dtype: bytes) : owned(NoRankArray)¶
          @@ -135,7 +135,7 @@
          -proc loadNumpyArray(path: string) : owned NoRankArray¶
          +proc loadNumpyArray(path: string) : owned(NoRankArray)¶
          diff --git a/docs/modules/lib/NDArray.html b/docs/modules/lib/NDArray.html index 0d553f112..5d63d30ee 100644 --- a/docs/modules/lib/NDArray.html +++ b/docs/modules/lib/NDArray.html @@ -98,122 +98,77 @@
          import NDArray;
           
          -
          -
          -class NDArrayData : serializable¶
          -
          -
          -param rank : int¶
          -
          - -
          -
          -type eltType = real(64)¶
          -
          - -
          -
          -var _domain : domain(rank, int) = util.emptyDomain(rank)¶
          -
          - -
          -
          -var data : [_domain] eltType = noinit¶
          -
          - -
          -
          -proc init(param rank: int, type eltType)¶
          -
          - -
          -
          -proc init(param rank: int, type eltType, dom: domain(rank, int))
          -
          - -
          -
          -proc init(param rank: int, type eltType, dom: domain(rank, int), A: [dom] eltType)
          -
          - -
          -
          -proc init(A: [] ?eltType)
          -
          - -
          -
          -proc init(me: NDArrayData(?rank, ?eltType))
          -
          - -
          -
          record ndarray : serializable¶
          -
          +
          -param rank : int¶
          +config param rank : int¶
          -
          +
          -type eltType = real(64)¶
          +config type eltType = real(32)¶
          -
          -
          -var arrayResource : owned NDArrayData(rank, eltType)¶
          +
          +
          +config var _domain : domain(rank, int)¶
          -
          -
          -proc borrowResource() : borrowed NDArrayData(rank, eltType)¶
          +
          +
          +config var data : [_domain] eltType = noinit¶
          -
          -proc resource : borrowed NDArrayData(rank, eltType)¶
          +
          +proc _dom¶
          -
          -proc data ref : arrayResource.data.type¶
          +
          +proc shape : rank*int¶
          -proc init(param rank: int, type eltType = real(64))¶
          +proc init(param rank: int, type eltType, const dom: domain(rank, int))¶ +
          + +
          +
          +proc init(param rank: int, type eltType, const dom: domain(rank, int), const arr: [] eltType)
          -proc init(dom: ?t, type eltType = real(64))  where isDomainType(t)
          +proc init(type eltType, const shape: ?rank*int)
          -proc init(type eltType = real(64), shape: int ...?rank)
          +proc init(param rank: int, type eltType = real(32))
          -proc init(arr: [] ?eltType, param isNormal: bool)  where isNormal == true
          +proc init(type eltType = real(32), const shape: int ...?rank)
          -proc init(arr: [] ?eltType, param isNormal: bool)  where isNormal == false
          +proc init(const dom: ?t, type eltType = real(32))  where isDomainType(t)
          -proc init(arr: [] ?eltType)
          +proc init(const Arr: [] ?eltType)
          -proc init(A: ndarray(?rank, ?eltType))
          +proc init(const A: ndarray(?rank, ?eltType))
          @@ -223,12 +178,12 @@
          -proc init=(other: [] ?eltType)¶
          +proc init=(const other: [] ?eltType)¶
          -proc init=(other: ndarray(?rank, ?eltType))
          +proc init=(const other: ndarray(?rank, ?eltType))
          @@ -243,17 +198,17 @@
          -proc ref setData(arr: [] eltType)  where arr.rank == rank¶
          +proc ref setData(const arr: [] eltType)  where arr.rank == rank¶
          -proc ref reshapeDomain(dom: arrayResource._domain.type)¶
          +proc ref reshapeDomain(const dom: domain(rank, int))¶
          -proc reshape(dom: arrayResource._domain.type) : ndarray(rank, eltType)¶
          +proc reshape(dom: domain(rank, int)) : ndarray(rank, eltType)¶
          @@ -333,12 +288,12 @@
          -proc populateRemote(ref re: remote(ndarray(rank, eltType))) : remote(ndarray(rank, eltType))¶
          +proc populateRemote(re: borrowed Remote(ndarray(rank, eltType))) : borrowed Remote(ndarray(rank, eltType))¶
          -proc toRemote() : remote(ndarray(rank, eltType))¶
          +proc toRemote() : owned(Remote(ndarray(rank, eltType)))¶
          @@ -375,52 +330,32 @@
          -operator =(ref lhs: ndarray(?rank, ?eltType), rhs: ndarray(rank, eltType))¶
          +operator =(ref lhs: ndarray(?rank, ?eltType), const rhs: ndarray(rank, eltType))¶
          -operator =(ref lhs: ndarray(?rank, ?eltType), rhs: [?d] eltType)  where d.rank == rank
          +operator =(ref lhs: ndarray(?rank, ?eltType), const rhs: [] eltType)  where rhs.rank == rank
          -operator :(val: [] ?eltType, type t: ndarray(val.rank, eltType))¶
          -
          - -
          -
          -proc remote.init(other: ndarray(?rank, ?eltType))¶
          -
          - -
          -
          -proc remote.init=(ref other: ndarray(?rank, ?eltType))¶
          +operator :(const val: [] ?eltType, type t: ndarray(val.rank, eltType))¶
          -operator =(ref lhs: remote(ndarray(?rank, ?eltType)), rhs: ndarray(rank, eltType))
          +operator :(const a: ndarray(?rank, ?eltType), type toType) : ndarray(rank, toType)  where toType != eltType
          -operator :(val: ndarray(?rank, ?eltType), type t: remote(ndarray(rank, eltType)))
          -
          - -
          -
          -proc remote.init(ref other: remote(ndarray(?rank, ?eltType)))
          -
          - -
          -
          -proc remote.init=(ref other: remote(ndarray(?rank, ?eltType)))
          +operator :(const a: ndarray(?rank, ?eltType), type toType) : ndarray(rank, toType)  where toType == eltType
          -operator =(ref lhs: remote(ndarray(?rank, ?eltType)), rhs: remote(ndarray(rank, eltType)))
          +operator :(it: _iteratorRecord, type t: ndarray(?rank, ?eltType))
          @@ -448,11 +383,6 @@ operator /(a: ndarray(?rank, ?eltType), b: ndarray(rank, eltType)) : ndarray(rank, eltType)¶
          -
          -
          -operator +(a: remote(ndarray(?rank, ?eltType)), b: remote(ndarray(rank, eltType))) : remote(ndarray(rank, eltType))
          -
          -
          proc type ndarray.convolve(features: ndarray(3, ?eltType), kernel: ndarray(4, eltType), stride: int) : ndarray(3, eltType)¶
          @@ -496,19 +426,19 @@
          class _tensor_resource¶
          -
          +
          -param rank : int¶
          +config param rank : int¶
          -
          +
          -type eltType = real(64)¶
          +config type eltType = real(64)¶
          -
          +
          -var data : remote(ndarray(rank, eltType))¶
          +config var data : remote(ndarray(rank, eltType))¶
          diff --git a/docs/modules/lib/Network.html b/docs/modules/lib/Network.html index 45bc4321f..1d6ab58e2 100644 --- a/docs/modules/lib/Network.html +++ b/docs/modules/lib/Network.html @@ -100,7 +100,7 @@
          -proc helpFindModuleByName(arg, x: string) : borrowed Module(?)?¶
          +proc helpFindModuleByName(arg, x: string) : borrowed Module(?)¶
          @@ -111,19 +111,19 @@
          record moduleChildren¶
          -
          +
          -type eltType = real¶
          +config type eltType = real¶
          -
          +
          -var childDict : map(string, borrowed Module(eltType))¶
          +config var childDict : map(string, borrowed Module(eltType))¶
          -
          +
          -var order : list(string)¶
          +config var order : list(string)¶
          @@ -186,19 +186,19 @@
          record moduleAttributes : serializable¶
          -
          +
          -var layerType : string¶
          +config var layerType : string¶
          -
          +
          -var moduleName : string¶
          +config var moduleName : string¶
          -
          +
          -var attributes : dict(string, string)¶
          +config var attributes : dict(string, string)¶
          @@ -256,36 +256,41 @@
          class ModuleSpecification : serializable¶
          -
          +
          -var layerType : string¶
          +config var layerType : string¶
          -
          +
          -var attributes : map(string, string)¶
          +config var attributes : map(string, string)¶
          -
          +
          -var subModules : map(string, owned ModuleSpecification?)¶
          +config var subModules : map(string, owned(?ModuleSpecification))¶
          -
          +
          -var subModuleOrder : list(string)¶
          +config var subModuleOrder : list(string)¶
          -proc moduleFromSpec(ms_: borrowed ModuleSpecification?) : owned Module(real)¶
          +proc moduleFromSpec(ms_: borrowed ?ModuleSpecification, type dtype = real(32)) : owned(Module(dtype))¶
          -proc modelFromSpecFile(path: string) : owned Module(real)¶
          +proc modelFromSpecFile(path: string, type dtype = real(32)) : owned(Module(dtype))¶ +
          + +
          +
          +proc loadModel(specFile: string, weightsFolder: string, type dtype = real(32)) : owned(Module(dtype))¶
          @@ -296,29 +301,29 @@
          class Module¶
          -
          +
          -type eltType = real¶
          +config type eltType¶
          -
          +
          -var subModules : moduleChildren(eltType)¶
          +config var subModules : moduleChildren(eltType)¶
          -
          +
          -var moduleId : int¶
          +config var moduleId : int¶
          -
          +
          -var moduleName : string¶
          +config var moduleName : string¶
          -
          +
          -var ownedModules : list(shared Module(eltType))¶
          +config var ownedModules : list(shared Module(eltType))¶
          @@ -358,7 +363,7 @@
          -proc addModule(name: string, in m: owned Module(eltType))
          +proc addModule(name: string, in m: owned(Module(eltType)))
          @@ -426,9 +431,9 @@
          class Parameter : Module(?)¶
          -
          +
          -var data : Tensor(eltType)¶
          +config var data : Tensor(eltType)¶
          @@ -446,9 +451,9 @@
          class Sequential : Module(?)¶
          -
          +
          -var mds : list(shared Module(eltType))¶
          +config var mds : list(shared Module(eltType))¶
          @@ -463,7 +468,7 @@
          -proc init(type eltType = real, order: list(string), in ms: map(string, owned Module(eltType)?))
          +proc init(type eltType = real, order: list(string), in ms: map(string, owned(?Module(eltType))))
          @@ -486,34 +491,34 @@
          class Linear : Module(?)¶
          -
          +
          var m : int¶
          -
          -
          -var n : m.type¶
          -
          +
          -
          -
          -var weight : owned Parameter(eltType)¶
          +
          +
          +var n : m.type¶
          +
          +
          +config var weight : owned(Parameter(eltType))¶
          -
          -
          -var bias : owned Parameter(eltType)¶
          +
          +
          +config var bias : owned(Parameter(eltType))¶
          -
          -proc init(type eltType, m: int, n: int)¶
          +
          +proc init(type eltType, m: int, n: int)¶
          -
          -override proc setup()¶
          +
          +override proc setup()¶
          @@ -522,13 +527,13 @@
          -
          -override proc forward(input: Tensor(eltType)) : Tensor(eltType)¶
          +
          +override proc forward(input: Tensor(eltType)) : Tensor(eltType)¶
          -
          -override proc attributes() : moduleAttributes¶
          +
          +override proc attributes() : moduleAttributes¶
          @@ -536,24 +541,24 @@
          class Conv2D : Module(?)¶
          -
          +
          -var kernelShape : 4*(int)¶
          +config var kernelShape : 4*int¶
          -
          +
          -var stride : int¶
          +config var stride : int¶
          -
          +
          -var kernel : owned Parameter(eltType)¶
          +config var kernel : owned(Parameter(eltType))¶
          -
          +
          -var bias : owned Parameter(eltType)¶
          +config var bias : owned(Parameter(eltType))¶
          @@ -591,9 +596,9 @@
          class MaxPool : Module(?)¶
          -
          +
          -var poolSize : int¶
          +config var poolSize : int¶
          diff --git a/docs/modules/lib/OrderedDict.html b/docs/modules/lib/OrderedDict.html index d68b2c7f7..388744f01 100644 --- a/docs/modules/lib/OrderedDict.html +++ b/docs/modules/lib/OrderedDict.html @@ -100,25 +100,25 @@
          -record dict¶
          -
          +record dict : serializable¶ +
          -type keyType¶
          +config type keyType¶
          -
          +
          -type valType¶
          +config type valType¶
          -
          +
          -var table : map(keyType, valType)¶
          +config var table : map(keyType, valType)¶
          -
          +
          -var order : list(keyType)¶
          +config var order : list(keyType)¶
          diff --git a/docs/modules/lib/Remote.html b/docs/modules/lib/Remote.html index f4a46fde4..0df7be2f3 100644 --- a/docs/modules/lib/Remote.html +++ b/docs/modules/lib/Remote.html @@ -98,126 +98,106 @@
          import Remote;
           
          -
          -
          -config const debug = true¶
          +
          +
          +class _RemoteVarContainer : serializable¶
          +
          +
          +config var containedValue¶
          -
          -
          -var defaultDevice = if here.gpus.size >= 1 then here.gpus[0] else here¶
          -
          +
          class Remote : serializable¶
          -
          +
          -type eltType¶
          +config type eltType¶
          -
          -
          -var device : locale = defaultDevice¶
          -
          - -
          -
          -var item : _remoteVarWrapper(eltType)¶
          +
          +
          +config var value : owned(_RemoteVarContainer(eltType))¶
          -
          -proc init(item: ?eltType, device: locale = defaultDevice)¶
          +
          +proc ref get() ref¶
          -
          -proc init(type eltType, device: locale = defaultDevice)
          +
          +proc ptr ref¶
          -
          -proc to(device_: locale)¶
          +
          +proc device : locale¶
          -
          -proc ref get() ref¶
          +
          +proc init(in value: owned(_RemoteVarContainer(?eltType)))¶
          -
          -proc serialize(writer, serializer)¶
          -
          - -
          - -
          -
          -record remote : serializable¶
          -
          -
          -type eltType¶
          -
          - -
          -
          -var remoteResource : shared Remote(eltType)¶
          +
          +proc init(value: ?eltType, device: locale = Remote.defaultDevice)  where !isSubtype(eltType, Remote(?))
          -
          -proc init(type eltType, device: locale = defaultDevice)¶
          +
          +proc init(type eltType, in tr: _thunkRecord, device: locale = Remote.defaultDevice)
          -proc init(item: ?eltType, device: locale = defaultDevice)
          +proc init(type eltType, device: locale = Remote.defaultDevice)
          -
          -proc device ref¶
          +
          +proc copyContainer(dest: locale = device) : owned(_RemoteVarContainer(eltType))¶
          -
          -proc ref get() ref¶
          +
          +proc copyTo(dest: locale = device) : owned(Remote(eltType))¶
          -
          -proc to(device_: locale)¶
          +
          +proc copy() : owned(Remote(eltType))¶
          -
          -proc copy() : remote(eltType)¶
          +
          +proc to(dest: locale)¶
          +
          +
          -
          -proc ref access() ref¶
          +
          +proc ref(owned(Remote(?eltType))).get() ref : owned(Remote(eltType))¶
          -
          -proc localAccess() ref¶
          +
          +proc ref(shared Remote(?eltType)).get() ref : shared Remote(eltType)
          -
          -proc download() : eltType¶
          +
          +proc ref(unmanaged(Remote(?eltType))).get() ref : unmanaged(Remote(eltType))
          -
          -proc ref unload() : eltType¶
          +
          +proc type Remote.defaultDevice : locale¶
          -
          - diff --git a/docs/modules/lib/SimpleDomain.html b/docs/modules/lib/SimpleDomain.html index 52ea9592c..4539fea57 100644 --- a/docs/modules/lib/SimpleDomain.html +++ b/docs/modules/lib/SimpleDomain.html @@ -106,19 +106,19 @@
          record rect¶
          -
          +
          -param rank : int¶
          +config param rank : int¶
          -
          +
          -var shape : rank*int¶
          +config var shape : rank*int¶
          -
          +
          -var offset : rank*int = zeroTup(rank)¶
          +config var offset : rank*int = zeroTup(rank)¶
          diff --git a/docs/modules/lib/StaticTensor.html b/docs/modules/lib/StaticTensor.html index 4f0bcc5ef..880bea3c7 100644 --- a/docs/modules/lib/StaticTensor.html +++ b/docs/modules/lib/StaticTensor.html @@ -101,19 +101,19 @@
          record tensor : serializable¶
          -
          +
          -param rank : int¶
          +config param rank : int¶
          -
          +
          -type eltType = real(64)¶
          +config type eltType = real(64)¶
          -
          +
          -var resource : shared BaseTensorResource(eltType, rank)¶
          +config var resource : shared BaseTensorResource(eltType, rank)¶
          @@ -133,12 +133,17 @@
          -proc init(resource: shared BaseTensorResource(?eltType, ?rank), param strict: bool = false)
          +proc init(in resource: shared BaseTensorResource(?eltType, ?rank)) +
          + +
          +
          +proc init(in resource: owned(BaseTensorResource(?eltType, ?rank)))
          -proc init(nda: ndarray(?rank, ?eltType))
          +proc init(array: ndarray(?rank, ?eltType))
          @@ -171,8 +176,18 @@ proc _setArrayData(value)¶
          +
          +
          +proc detach(copy: bool = true, keepGrad: bool = false) : tensor(rank, eltType)¶
          +
          +
          +
          +
          +operator :(in t: tensor(?rank, ?eltType), type toType) : tensor(rank, toType)¶
          +
          +
          proc tensorFromCtx(param rank: int, type eltType, ctx) : tensor(rank, eltType)¶
          @@ -320,7 +335,7 @@
          -proc type tensor.fromShape(type eltType = real, shape: int ...?rank, value: eltType = 0: eltType) : tensor(rank, eltType)¶
          +proc type tensor.fromShape(type eltType = real, shape: int ...?rank, value: eltType = 0 : eltType) : tensor(rank, eltType)¶
          @@ -345,17 +360,17 @@
          -config const n = 100¶
          +const n = 100¶
          -config const diag = false¶
          +const diag = false¶
          -config const size = 3¶
          +const size = 3¶
          diff --git a/docs/modules/lib/Utilities.html b/docs/modules/lib/Utilities.html index 8c973eb10..1f54e391c 100644 --- a/docs/modules/lib/Utilities.html +++ b/docs/modules/lib/Utilities.html @@ -111,7 +111,12 @@
          -config param loopGpuSupport = false¶
          +param loopGpuSupport = CHPL_LOCALE_MODEL == "gpu"¶ +
          + +
          +
          +proc targetGpu() param : bool¶
          diff --git a/docs/modules/lib/Utilities/Standard.html b/docs/modules/lib/Utilities/Standard.html index e1e7b394e..f44ca07e4 100644 --- a/docs/modules/lib/Utilities/Standard.html +++ b/docs/modules/lib/Utilities/Standard.html @@ -203,6 +203,11 @@ proc _domain.fastShape¶
          +
          +
          +proc _domain.fastNormalDims¶
          +
          +
          proc _domain.myShape¶
          @@ -210,7 +215,7 @@
          -proc _domain.normalize : this.type  where this.isRectangular()¶
          +proc _domain.normalize  where this.isRectangular()¶
          diff --git a/docs/modules/lib/Utilities/Types.html b/docs/modules/lib/Utilities/Types.html index c80fca764..45ef4548e 100644 --- a/docs/modules/lib/Utilities/Types.html +++ b/docs/modules/lib/Utilities/Types.html @@ -107,6 +107,16 @@ type stdRange = range(idxType = int, bounds = boundKind.both, strides = strideKind.one)¶
          +
          +
          +type f32 = real(32)¶
          +
          + +
          +
          +type f64 = real(64)¶
          +
          + diff --git a/docs/objects.inv b/docs/objects.inv index 6893acafe..83fb77baf 100644 Binary files a/docs/objects.inv and b/docs/objects.inv differ diff --git a/docs/searchindex.js b/docs/searchindex.js index 80b3f23f7..3f2491c40 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["index", "modules/lib/Autograd", "modules/lib/DynamicTensor", "modules/lib/LoadNumpy", "modules/lib/NDArray", "modules/lib/Network", "modules/lib/OrderedDict", "modules/lib/Remote", "modules/lib/SimpleDomain", "modules/lib/StaticTensor", "modules/lib/Tensor", "modules/lib/Utilities", "modules/lib/Utilities/Standard", "modules/lib/Utilities/Types"], "filenames": ["index.rst", "modules/lib/Autograd.rst", "modules/lib/DynamicTensor.rst", "modules/lib/LoadNumpy.rst", "modules/lib/NDArray.rst", "modules/lib/Network.rst", "modules/lib/OrderedDict.rst", "modules/lib/Remote.rst", "modules/lib/SimpleDomain.rst", "modules/lib/StaticTensor.rst", "modules/lib/Tensor.rst", "modules/lib/Utilities.rst", "modules/lib/Utilities/Standard.rst", "modules/lib/Utilities/Types.rst"], "titles": ["chpldoc documentation", "Autograd", "DynamicTensor", "LoadNumpy", "NDArray", "Network", "OrderedDict", "Remote", "SimpleDomain", "StaticTensor", "Tensor", "Utilities", "Standard", "Types"], "terms": {"content": 0, "autograd": 0, "dynamictensor": 0, "loadnumpi": 0, "ndarrai": [0, 1, 2, 9], "network": 0, "ordereddict": 0, "remot": [0, 1, 4], "simpledomain": 0, "statictensor": 0, "tensor": [0, 2, 5, 9], "util": [0, 4, 12, 13], "standard": [0, 11], "type": [0, 1, 2, 4, 5, 6, 7, 9, 11, 12], "index": 0, "chapel": 0, "modul": [0, 5], "search": 0, "page": 0, "usag": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], "us": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], "import": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], "proc": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12], "checkrank": [1, 2], "te": 1, "share": [1, 2, 5, 7, 9], "tensoress": [1, 2], "elttyp": [1, 2, 4, 5, 7, 9, 12], "param": [1, 2, 3, 4, 5, 8, 9, 11, 12], "rank": [1, 2, 3, 4, 5, 8, 9, 11, 12], "int": [1, 2, 3, 4, 5, 6, 8, 9, 11, 12, 13], "bool": [1, 2, 4, 9, 12], "getrank": 1, "forcerank": [1, 2], "basetensorresourc": [1, 2, 9], "class": [1, 3, 4, 5, 7], "serializ": [1, 2, 4, 5, 7, 9], "real": [1, 2, 3, 4, 5, 9], "runtimerank": [1, 2], "forgetfultensor": 1, "var": [1, 2, 3, 4, 5, 6, 7, 8, 9], "dataresourc": 1, "gradresourc": 1, "device_": [1, 7], "local": [1, 2, 7], "devic": [1, 2, 7], "forward": [1, 5], "backward": 1, "grad": [1, 2], "alreadypopul": 1, "fals": [1, 2, 4, 5, 9, 11, 12], "where": [1, 2, 4, 5, 9, 11, 12], "1": [1, 2, 4, 5, 7, 9, 11, 12], "arrai": [1, 2], "ref": [1, 2, 4, 5, 6, 7, 9], "data": [1, 2, 3, 4, 5], "graddata": 1, "_loc": 1, "overrid": [1, 5], "tensorresourc": 1, "oper": [1, 2, 4, 5, 9], "operationdata": 1, "init": [1, 2, 4, 5, 6, 7, 8, 9], "resourc": [1, 2, 4, 9], "defaultdevic": [1, 7], "record": [1, 2, 4, 5, 6, 7, 8, 9], "basevalu": 1, "children": 1, "reluop": 1, "input": [1, 5], "_relu": 1, "x": [1, 5, 11, 12], "expop": 1, "addop": 1, "lh": [1, 4], "rh": [1, 4], "subop": 1, "divop": 1, "multop": 1, "reshapeop": 1, "oldrank": 1, "newrank": [1, 4, 9], "shape": [1, 3, 4, 8, 9, 11], "permuteop": 1, "permut": [1, 4, 9], "expandop": 1, "expandedshap": 1, "padop": 1, "arg": [1, 2, 4, 5, 9, 11], "2": [1, 4, 9, 11], "valu": [1, 4, 6, 9], "shrinkop": 1, "sliceop": 1, "dom": [1, 2, 4, 9, 11], "domain": [1, 2, 3, 4, 9, 11], "layersliceop": 1, "base": 1, "mask": 1, "maskdomain": 1, "sumop": 1, "sumrank": 1, "ax": [1, 2, 4, 9], "outrank": 1, "maxop": 1, "maxrank": [1, 2], "conv2dop": 1, "featur": [1, 2, 4, 5, 9], "3": [1, 4, 9], "kernel": [1, 2, 4, 5, 9], "4": [1, 4, 5, 9], "stride": [1, 2, 4, 5, 9, 13], "config": [2, 7, 9, 11], "6": 2, "meta": [2, 9], "t": [2, 4, 5, 11], "arr": [2, 4, 9, 11], "thi": [2, 4, 5, 9, 12], "forcerankmeta": 2, "hardcheckrank": 2, "tondarrai": 2, "toarrai": 2, "totensor": 2, "eraserank": 2, "zipbinop": 2, "opnam": 2, "string": [2, 3, 4, 5, 12], "b": [2, 4, 9], "loadfromnumpi": 2, "path": [2, 3, 5], "sum": [2, 4, 9], "r": [2, 9], "relu": [2, 4, 5, 9], "max": [2, 4, 9], "exp": [2, 9], "softmax": [2, 5, 9], "maxpool": [2, 4, 5, 9], "poolsiz": [2, 4, 5, 9], "reshap": [2, 4, 9], "slice": [2, 4, 9, 12], "rng": [2, 4, 9], "rang": [2, 4, 9, 11, 13], "flatten": [2, 5], "matvecmul": [2, 4, 9], "m": [2, 5, 9], "v": [2, 9], "matvecmulfast": [2, 9], "argmax": [2, 4], "convolv": [2, 4, 9], "bia": [2, 4, 5, 9], "arang": [2, 4, 9], "ones": [2, 9], "zero": [2, 9], "main": [2, 3, 4, 5, 9], "serial": [2, 4, 7, 9], "writer": [2, 4, 7, 9], "io": [2, 4, 9], "filewrit": [2, 4, 9], "lock": [2, 4, 9], "defaultseri": [2, 4, 9], "srt2": [2, 9], "write": [2, 4], "fw": [2, 4], "throw": [2, 4, 9], "save": 2, "multiread": 2, "load": 2, "precis": 2, "64": [2, 4, 9], "readinplac": 2, "fr": [2, 3, 4, 9], "fileread": [2, 4, 9], "norankarrai": 3, "arrclass": 3, "_domain": [3, 4, 12], "readdata": 3, "dtype": 3, "byte": 3, "own": [3, 4, 5], "readshap": 3, "loadnumpyarrai": 3, "ndarraydata": 4, "emptydomain": [4, 11], "noinit": 4, "A": 4, "me": 4, "arrayresourc": 4, "borrowresourc": 4, "borrow": [4, 5], "isdomaintyp": 4, "isnorm": [4, 12], "true": [4, 7, 9], "_iteratorrecord": [4, 9], "other": 4, "setdata": 4, "reshapedomain": [4, 9], "newshap": [4, 9], "expand": [4, 9], "sumoneaxi": 4, "axi": 4, "sumaxesmask": 4, "withaxesmask": 4, "axescount": 4, "shrink": [4, 9], "narg": 4, "exactbound": 4, "pad": [4, 9], "0": [4, 5, 7, 9, 12], "dilat": [4, 9], "dil": [4, 9], "squeez": 4, "populateremot": 4, "re": 4, "toremot": 4, "iter": [4, 5, 6, 11, 12], "batchifi": 4, "dim": [4, 9], "kernelrot": 4, "d": [4, 11], "val": 4, "ziparr": 4, "f": [4, 12], "mat": [4, 9], "vec": [4, 9], "fromrang": 4, "read": [4, 9], "_tensor_resourc": 4, "fullout": 4, "ranka": 4, "rankb": 4, "contract": 4, "axisa": 4, "axisb": 4, "splitat": 4, "": 4, "del": [4, 12], "idx": [4, 12], "getfirstidx": 4, "slicegener": 4, "start": [4, 11, 12], "stop": [4, 12], "take": [4, 12], "count": [4, 11, 12], "drop": [4, 12], "einsum": 4, "subscript": 4, "helpfindmodulebynam": 5, "helpfindparamdatabynam": 5, "modulechildren": 5, "childdict": 5, "map": [5, 6, 12], "order": [5, 6], "list": [5, 6], "item": [5, 7], "add": 5, "name": 5, "ith": 5, "i": 5, "fieldnam": 5, "issubtyp": 5, "paramet": 5, "modulefieldnam": 5, "modulefield": 5, "registermodul": 5, "postinit": 5, "moduleattribut": 5, "layertyp": 5, "modulenam": 5, "attribut": 5, "dict": [5, 6], "attr": 5, "valtyp": [5, 6], "n": [5, 9, 11, 12], "getint": 5, "prettyprint": 5, "prettyprintspec": 5, "ma": 5, "modulespecif": 5, "submodul": [5, 11], "submoduleord": 5, "modulefromspec": 5, "ms_": 5, "modelfromspecfil": 5, "moduleinst": 5, "moduleid": 5, "ownedmodul": 5, "setup": 5, "getsubmodulenam": 5, "addmodul": 5, "addparamet": 5, "par": 5, "paramnam": 5, "mod": 5, "modnam": 5, "parameternam": 5, "namedmodul": 5, "loadpytorchdump": 5, "modelpath": 5, "debug": [5, 7], "signatur": 5, "sequenti": 5, "md": 5, "overridenam": 5, "linear": 5, "weight": 5, "conv2d": 5, "kernelshap": 5, "channel": 5, "dropout": 5, "freq": 5, "5": 5, "chain": 5, "net": 5, "keytyp": 6, "tabl": 6, "size": [6, 7, 8, 9, 12], "kei": 6, "insert": 6, "const": [7, 9], "here": 7, "gpu": 7, "els": 7, "_remotevarwrapp": 7, "get": 7, "remoteresourc": 7, "copi": 7, "access": 7, "localaccess": 7, "download": 7, "unload": 7, "zerotup": 8, "rect": 8, "offset": 8, "_dom": 9, "strict": 9, "nda": 9, "_setarraydata": 9, "tensorfromctx": 9, "ctx": 9, "unsqueez": 9, "matvec": 9, "fromshap": 9, "100": 9, "diag": 9, "capitalt": 9, "loopgpusupport": 11, "debugprint": 11, "err": 11, "debugwrit": 11, "cartesian": 11, "y": 11, "tag": [11, 12], "iterkind": [11, 12], "standalon": [11, 12], "flatit": 11, "normalizearrai": 11, "unknown": 11, "isarraytyp": 11, "normalizedomain": 11, "domainfromshap": 11, "rangefrombound": 11, "high": [11, 12], "low": [11, 12], "rangefromstart": 11, "rangesfrombound": 11, "bound": [11, 13], "rangesfromshap": 11, "nbase": 11, "indexinshap": 11, "indexathelperprod": 11, "prod": 11, "indexathelpermultipl": 11, "div": 11, "indexat": [11, 12], "fasteach": 11, "argsort": 11, "tup": 11, "_tupl": 12, "imagetyp": 12, "ishomogeneoustupl": 12, "removeidx": 12, "untuplifi": 12, "insertidx": 12, "each": 12, "everi": 12, "everyzip": 12, "fastshap": 12, "myshap": 12, "normal": 12, "isrectangular": 12, "countoccurr": 12, "c": 12, "takeuntil": 12, "keepdel": 12, "stdrang": 13, "idxtyp": 13, "boundkind": 13, "both": 13, "stridekind": 13, "one": 13}, "objects": {"": [[1, 0, 0, "-", "Autograd"], [2, 0, 0, "-", "DynamicTensor"], [3, 0, 0, "-", "LoadNumpy"], [4, 0, 0, "-", "NDArray"], [5, 0, 0, "-", "Network"], [6, 0, 0, "-", "OrderedDict"], [7, 0, 0, "-", "Remote"], [8, 0, 0, "-", "SimpleDomain"], [12, 0, 0, "-", "Standard"], [9, 0, 0, "-", "StaticTensor"], [10, 0, 0, "-", "Tensor"], [13, 0, 0, "-", "Types"], [11, 0, 0, "-", "Utilities"]], "Autograd": [[1, 1, 1, "", "BaseTensorResource"], [1, 1, 1, "", "ForgetfulTensor"], [1, 1, 1, "", "TensorEssence"], [1, 1, 1, "", "TensorResource"], [1, 4, 1, "", "addOp"], [1, 4, 1, "", "baseValue"], [1, 5, 1, "", "checkRank"], [1, 4, 1, "", "conv2DOp"], [1, 4, 1, "", "divOp"], [1, 4, 1, "", "expOp"], [1, 4, 1, "", "expandOp"], [1, 5, 1, "", "forceRank"], [1, 5, 1, "", "getRank"], [1, 4, 1, "", "layerSliceOp"], [1, 4, 1, "", "maxOp"], [1, 4, 1, "", "multOp"], [1, 4, 1, "", "padOp"], [1, 4, 1, "", "permuteOp"], [1, 4, 1, "", "reluOp"], [1, 4, 1, "", "reshapeOp"], [1, 4, 1, "", "shrinkOp"], [1, 4, 1, "", "sliceOp"], [1, 4, 1, "", "subOp"], [1, 4, 1, "", "sumOp"]], "Autograd.BaseTensorResource": [[1, 2, 1, "", "_loc"], [1, 2, 1, "", "array"], [1, 2, 1, "", "backward"], [1, 2, 1, "", "data"], [1, 3, 1, "", "dataResource"], [1, 2, 1, "", "device"], [1, 2, 1, "", "forward"], [1, 2, 1, "", "grad"], [1, 2, 1, "", "gradData"], [1, 3, 1, "", "gradResource"], [1, 3, 1, "", "rank"], [1, 2, 1, "", "runtimeRank"], [1, 2, 1, "", "to"]], "Autograd.ForgetfulTensor": [[1, 3, 1, "", "rank"]], "Autograd.TensorEssence": [[1, 3, 1, "", "eltType"], [1, 2, 1, "", "runtimeRank"]], "Autograd.TensorResource": [[1, 2, 1, "", "backward"], [1, 2, 1, "", "forward"], [1, 2, 1, "", "init"], [1, 3, 1, "", "operation"], [1, 3, 1, "", "operationData"]], "Autograd.addOp": [[1, 2, 1, "", "backward"], [1, 2, 1, "", "children"], [1, 3, 1, "", "eltType"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "lhs"], [1, 3, 1, "", "rank"], [1, 3, 1, "", "rhs"]], "Autograd.baseValue": [[1, 2, 1, "", "children"], [1, 2, 1, "", "forward"]], "Autograd.conv2DOp": [[1, 2, 1, "", "backward"], [1, 2, 1, "", "children"], [1, 3, 1, "", "eltType"], [1, 3, 1, "", "features"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "kernel"], [1, 3, 1, "", "stride"]], "Autograd.divOp": [[1, 2, 1, "", "forward"], [1, 3, 1, "", "lhs"], [1, 3, 1, "", "rhs"]], "Autograd.expOp": [[1, 2, 1, "", "children"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "input"]], "Autograd.expandOp": [[1, 2, 1, "", "backward"], [1, 2, 1, "", "children"], [1, 3, 1, "", "eltType"], [1, 3, 1, "", "expandedShape"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "input"], [1, 3, 1, "", "rank"]], "Autograd.layerSliceOp": [[1, 2, 1, "", "backward"], [1, 3, 1, "", "base"], [1, 2, 1, "", "children"], [1, 3, 1, "", "eltType"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "mask"], [1, 3, 1, "", "maskDomain"], [1, 3, 1, "", "rank"]], "Autograd.maxOp": [[1, 3, 1, "", "axes"], [1, 2, 1, "", "backward"], [1, 2, 1, "", "children"], [1, 3, 1, "", "eltType"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "input"], [1, 3, 1, "", "maxRank"], [1, 3, 1, "", "rank"]], "Autograd.multOp": [[1, 2, 1, "", "backward"], [1, 2, 1, "", "children"], [1, 3, 1, "", "eltType"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "lhs"], [1, 3, 1, "", "rank"], [1, 3, 1, "", "rhs"]], "Autograd.padOp": [[1, 3, 1, "", "arg"], [1, 2, 1, "", "backward"], [1, 2, 1, "", "children"], [1, 3, 1, "", "eltType"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "input"], [1, 3, 1, "", "rank"], [1, 3, 1, "", "value"]], "Autograd.permuteOp": [[1, 2, 1, "", "backward"], [1, 2, 1, "", "children"], [1, 3, 1, "", "eltType"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "input"], [1, 3, 1, "", "permutation"], [1, 3, 1, "", "rank"]], "Autograd.reluOp": [[1, 2, 1, "", "_relu"], [1, 2, 1, "", "children"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "input"]], "Autograd.reshapeOp": [[1, 2, 1, "", "backward"], [1, 2, 1, "", "children"], [1, 3, 1, "", "eltType"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "input"], [1, 3, 1, "", "newRank"], [1, 3, 1, "", "oldRank"], [1, 3, 1, "", "shape"]], "Autograd.shrinkOp": [[1, 3, 1, "", "arg"], [1, 2, 1, "", "backward"], [1, 2, 1, "", "children"], [1, 3, 1, "", "eltType"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "input"], [1, 3, 1, "", "rank"]], "Autograd.sliceOp": [[1, 2, 1, "", "backward"], [1, 2, 1, "", "children"], [1, 3, 1, "", "dom"], [1, 3, 1, "", "eltType"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "input"], [1, 3, 1, "", "rank"]], "Autograd.subOp": [[1, 2, 1, "", "forward"], [1, 3, 1, "", "lhs"], [1, 3, 1, "", "rhs"]], "Autograd.sumOp": [[1, 3, 1, "", "axes"], [1, 2, 1, "", "backward"], [1, 2, 1, "", "children"], [1, 3, 1, "", "eltType"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "input"], [1, 2, 1, "", "outRank"], [1, 3, 1, "", "rank"], [1, 3, 1, "", "sumRank"]], "DynamicTensor": [[2, 5, 1, "", "*"], [2, 5, 1, "", "+"], [2, 5, 1, "", "-"], [2, 5, 1, "", ":"], [2, 4, 1, "", "Tensor"], [2, 5, 1, "", "main"], [2, 6, 1, "", "maxRank"], [2, 5, 1, "", "zipBinOp"]], "DynamicTensor.Tensor": [[2, 2, 1, "", "arange"], [2, 2, 1, "", "argmax"], [2, 2, 1, "", "array"], [2, 2, 1, "", "checkRank"], [2, 2, 1, "", "convolve"], [2, 2, 1, "", "data"], [2, 2, 1, "", "device"], [2, 3, 1, "", "eltType"], [2, 2, 1, "", "exp"], [2, 2, 1, "", "flatten"], [2, 2, 1, "", "forceRank"], [2, 2, 1, "", "forceRankMeta"], [2, 2, 1, "", "grad"], [2, 2, 1, "", "hardCheckRank"], [2, 2, 1, "", "init"], [2, 2, 1, "", "load"], [2, 2, 1, "", "loadFromNumpy"], [2, 2, 1, "", "matvecmul"], [2, 2, 1, "", "matvecmulFast"], [2, 2, 1, "", "max"], [2, 2, 1, "", "maxPool"], [2, 3, 1, "", "meta"], [2, 2, 1, "", "multiReader"], [2, 2, 1, "", "ones"], [2, 2, 1, "", "readInPlace"], [2, 2, 1, "", "relu"], [2, 2, 1, "", "reshape"], [2, 2, 1, "", "resource"], [2, 3, 1, "", "runtimeRank"], [2, 2, 1, "", "save"], [2, 2, 1, "", "serialize"], [2, 2, 1, "", "slice"], [2, 2, 1, "", "softmax"], [2, 2, 1, "", "sum"], [2, 2, 1, "", "tensorize"], [2, 2, 1, "", "this"], [2, 2, 1, "", "to"], [2, 2, 1, "", "toArray"], [2, 2, 1, "", "toNDArray"], [2, 2, 1, "", "write"], [2, 2, 1, "", "zeros"]], "DynamicTensor.ndarray": [[2, 2, 1, "", "toTensor"]], "DynamicTensor.tensor": [[2, 2, 1, "", "eraseRank"]], "LoadNumpy": [[3, 1, 1, "", "ArrClass"], [3, 1, 1, "", "NoRankArray"], [3, 5, 1, "", "loadNumpyArray"], [3, 5, 1, "", "main"], [3, 5, 1, "", "readData"], [3, 5, 1, "", "readShape"]], "LoadNumpy.ArrClass": [[3, 3, 1, "", "_domain"], [3, 3, 1, "", "data"], [3, 3, 1, "", "rank"]], "NDArray": [[4, 5, 1, "", "*"], [4, 5, 1, "", "+"], [4, 5, 1, "", "-"], [4, 5, 1, "", "/"], [4, 5, 1, "", ":"], [4, 5, 1, "", "="], [4, 1, 1, "", "NDArrayData"], [4, 1, 1, "", "_tensor_resource"], [4, 5, 1, "", "drop"], [4, 5, 1, "", "getFirstIdx"], [4, 5, 1, "", "main"], [4, 4, 1, "", "ndarray"], [4, 5, 1, "", "slice"], [4, 5, 1, "", "sliceGeneric"], [4, 5, 1, "", "splitAt"], [4, 5, 1, "", "take"], [4, 5, 1, "", "zipArr"]], "NDArray.NDArrayData": [[4, 3, 1, "", "_domain"], [4, 3, 1, "", "data"], [4, 3, 1, "", "eltType"], [4, 2, 1, "", "init"], [4, 3, 1, "", "rank"]], "NDArray._tensor_resource": [[4, 3, 1, "", "data"], [4, 3, 1, "", "eltType"], [4, 3, 1, "", "rank"]], "NDArray.ndarray": [[4, 2, 1, "", "arange"], [4, 2, 1, "", "argmax"], [4, 3, 1, "", "arrayResource"], [4, 7, 1, "", "batchify"], [4, 2, 1, "", "borrowResource"], [4, 2, 1, "", "contract"], [4, 2, 1, "", "convolve"], [4, 2, 1, "", "data"], [4, 2, 1, "", "dilate"], [4, 2, 1, "", "einsum"], [4, 3, 1, "", "eltType"], [4, 2, 1, "", "expand"], [4, 2, 1, "", "fromRanges"], [4, 2, 1, "", "fullOuter"], [4, 2, 1, "", "init"], [4, 2, 1, "", "init="], [4, 2, 1, "", "kernelRot"], [4, 2, 1, "", "matvecmul"], [4, 2, 1, "", "max"], [4, 2, 1, "", "maxPool"], [4, 2, 1, "", "pad"], [4, 2, 1, "", "permute"], [4, 2, 1, "", "populateRemote"], [4, 3, 1, "", "rank"], [4, 2, 1, "", "read"], [4, 2, 1, "", "relu"], [4, 2, 1, "", "reshape"], [4, 2, 1, "", "reshapeDomain"], [4, 2, 1, "", "resource"], [4, 2, 1, "", "serialize"], [4, 2, 1, "", "setData"], [4, 2, 1, "", "shrink"], [4, 2, 1, "", "slice"], [4, 2, 1, "", "squeeze"], [4, 2, 1, "", "sum"], [4, 2, 1, "", "sumAxesMask"], [4, 2, 1, "", "sumOneAxis"], [4, 2, 1, "", "this"], [4, 2, 1, "", "toRemote"], [4, 2, 1, "", "write"]], "NDArray.remote": [[4, 2, 1, "", "init"], [4, 2, 1, "", "init="]], "Network": [[5, 1, 1, "", "Conv2D"], [5, 1, 1, "", "Dropout"], [5, 1, 1, "", "Flatten"], [5, 1, 1, "", "Linear"], [5, 1, 1, "", "MaxPool"], [5, 1, 1, "", "Module"], [5, 1, 1, "", "ModuleSpecification"], [5, 1, 1, "", "Net"], [5, 1, 1, "", "Parameter"], [5, 1, 1, "", "ReLU"], [5, 1, 1, "", "Sequential"], [5, 1, 1, "", "Softmax"], [5, 5, 1, "", "chain"], [5, 5, 1, "", "helpFindModuleByName"], [5, 5, 1, "", "helpFindParamDataByName"], [5, 5, 1, "", "main"], [5, 5, 1, "", "modelFromSpecFile"], [5, 4, 1, "", "moduleAttributes"], [5, 4, 1, "", "moduleChildren"], [5, 5, 1, "", "moduleFromSpec"], [5, 6, 1, "", "moduleInstances"]], "Network.Conv2D": [[5, 2, 1, "", "attributes"], [5, 3, 1, "", "bias"], [5, 2, 1, "", "forward"], [5, 2, 1, "", "init"], [5, 3, 1, "", "kernel"], [5, 3, 1, "", "kernelShape"], [5, 2, 1, "", "setup"], [5, 3, 1, "", "stride"]], "Network.Dropout": [[5, 2, 1, "", "attributes"], [5, 2, 1, "", "forward"], [5, 2, 1, "", "init"]], "Network.Flatten": [[5, 2, 1, "", "attributes"], [5, 2, 1, "", "forward"], [5, 2, 1, "", "init"]], "Network.Linear": [[5, 2, 1, "", "attributes"], [5, 3, 1, "", "bias"], [5, 2, 1, "", "forward"], [5, 2, 1, "", "init"], [5, 3, 1, "", "m"], [5, 3, 1, "", "n"], [5, 2, 1, "", "setup"], [5, 3, 1, "", "weight"]], "Network.MaxPool": [[5, 2, 1, "", "attributes"], [5, 2, 1, "", "forward"], [5, 2, 1, "", "init"], [5, 3, 1, "", "poolSize"]], "Network.Module": [[5, 2, 1, "", "addModule"], [5, 2, 1, "", "addParameter"], [5, 2, 1, "", "attributes"], [5, 3, 1, "", "eltType"], [5, 2, 1, "", "forward"], [5, 2, 1, "", "getSubModuleName"], [5, 2, 1, "", "init"], [5, 2, 1, "", "loadPyTorchDump"], [5, 2, 1, "", "mod"], [5, 3, 1, "", "moduleId"], [5, 3, 1, "", "moduleName"], [5, 7, 1, "", "moduleNames"], [5, 7, 1, "", "modules"], [5, 7, 1, "", "namedModules"], [5, 3, 1, "", "ownedModules"], [5, 2, 1, "", "par"], [5, 7, 1, "", "parameterNames"], [5, 7, 1, "", "parameters"], [5, 2, 1, "", "setup"], [5, 2, 1, "", "signature"], [5, 3, 1, "", "subModules"], [5, 2, 1, "", "this"]], "Network.ModuleSpecification": [[5, 3, 1, "", "attributes"], [5, 3, 1, "", "layerType"], [5, 3, 1, "", "subModuleOrder"], [5, 3, 1, "", "subModules"]], "Network.Net": [[5, 2, 1, "", "forward"], [5, 2, 1, "", "init"]], "Network.Parameter": [[5, 2, 1, "", "attributes"], [5, 3, 1, "", "data"], [5, 2, 1, "", "init"]], "Network.ReLU": [[5, 2, 1, "", "attributes"], [5, 2, 1, "", "forward"], [5, 2, 1, "", "init"]], "Network.Sequential": [[5, 2, 1, "", "attributes"], [5, 2, 1, "", "forward"], [5, 2, 1, "", "init"], [5, 3, 1, "", "mds"]], "Network.Softmax": [[5, 2, 1, "", "attributes"], [5, 2, 1, "", "forward"], [5, 2, 1, "", "init"]], "Network.class": [[5, 7, 1, "", "moduleFieldNames"], [5, 7, 1, "", "moduleFields"], [5, 2, 1, "", "postinit"], [5, 2, 1, "", "registerModules"], [5, 2, 1, "", "this"]], "Network.moduleAttributes": [[5, 2, 1, "", ":"], [5, 3, 1, "", "attributes"], [5, 2, 1, "", "getInt"], [5, 2, 1, "", "init"], [5, 3, 1, "", "layerType"], [5, 3, 1, "", "moduleName"], [5, 2, 1, "", "prettyPrint"], [5, 2, 1, "", "prettyPrintSpec"]], "Network.moduleChildren": [[5, 2, 1, "", "add"], [5, 3, 1, "", "childDict"], [5, 3, 1, "", "eltType"], [5, 2, 1, "", "init"], [5, 7, 1, "", "items"], [5, 2, 1, "", "ith"], [5, 3, 1, "", "order"], [5, 7, 1, "", "these"]], "OrderedDict": [[6, 4, 1, "", "dict"]], "OrderedDict.dict": [[6, 2, 1, "", "init"], [6, 2, 1, "", "insert"], [6, 3, 1, "", "keyType"], [6, 7, 1, "", "keys"], [6, 3, 1, "", "order"], [6, 2, 1, "", "size"], [6, 3, 1, "", "table"], [6, 7, 1, "", "these"], [6, 3, 1, "", "valType"], [6, 7, 1, "", "values"]], "Remote": [[7, 1, 1, "", "Remote"], [7, 6, 1, "", "debug"], [7, 6, 1, "", "defaultDevice"], [7, 4, 1, "", "remote"]], "Remote.Remote": [[7, 3, 1, "", "device"], [7, 3, 1, "", "eltType"], [7, 2, 1, "", "get"], [7, 2, 1, "", "init"], [7, 3, 1, "", "item"], [7, 2, 1, "", "serialize"], [7, 2, 1, "", "to"]], "Remote.remote": [[7, 2, 1, "", "access"], [7, 2, 1, "", "copy"], [7, 2, 1, "", "device"], [7, 2, 1, "", "download"], [7, 3, 1, "", "eltType"], [7, 2, 1, "", "get"], [7, 2, 1, "", "init"], [7, 2, 1, "", "localAccess"], [7, 3, 1, "", "remoteResource"], [7, 2, 1, "", "to"], [7, 2, 1, "", "unload"]], "SimpleDomain": [[8, 4, 1, "", "rect"], [8, 5, 1, "", "zeroTup"]], "SimpleDomain.rect": [[8, 2, 1, "", "init"], [8, 3, 1, "", "offset"], [8, 3, 1, "", "rank"], [8, 3, 1, "", "shape"], [8, 2, 1, "", "size"]], "Standard._domain": [[12, 7, 1, "", "each"], [12, 7, 1, "", "every"], [12, 7, 1, "", "everyZip"], [12, 2, 1, "", "fastShape"], [12, 2, 1, "", "indexAt"], [12, 2, 1, "", "isNormal"], [12, 2, 1, "", "myShape"], [12, 2, 1, "", "normalize"]], "Standard._tuple": [[12, 7, 1, "", "each"], [12, 2, 1, "", "eltType"], [12, 2, 1, "", "imageType"], [12, 2, 1, "", "indexAt"], [12, 2, 1, "", "insertIdx"], [12, 2, 1, "", "map"], [12, 2, 1, "", "removeIdx"], [12, 2, 1, "", "slice"], [12, 2, 1, "", "untuplify"]], "Standard.string": [[12, 2, 1, "", "countOccurrences"], [12, 2, 1, "", "drop"], [12, 2, 1, "", "slice"], [12, 2, 1, "", "take"], [12, 2, 1, "", "takeUntil"], [12, 2, 1, "", "this"]], "StaticTensor": [[9, 5, 1, "", "*"], [9, 5, 1, "", "+"], [9, 5, 1, "", "-"], [9, 5, 1, "", "/"], [9, 6, 1, "", "diag"], [9, 5, 1, "", "main"], [9, 5, 1, "", "matvec"], [9, 6, 1, "", "n"], [9, 6, 1, "", "size"], [9, 4, 1, "", "tensor"], [9, 5, 1, "", "tensorFromCtx"]], "StaticTensor.tensor": [[9, 2, 1, "", "_dom"], [9, 2, 1, "", "_setArrayData"], [9, 2, 1, "", "arange"], [9, 2, 1, "", "convolve"], [9, 2, 1, "", "dilate"], [9, 3, 1, "", "eltType"], [9, 2, 1, "", "exp"], [9, 2, 1, "", "expand"], [9, 2, 1, "", "fromShape"], [9, 2, 1, "", "init"], [9, 2, 1, "", "matvecmul"], [9, 2, 1, "", "matvecmulFast"], [9, 2, 1, "", "max"], [9, 2, 1, "", "maxPool"], [9, 2, 1, "", "meta"], [9, 2, 1, "", "ones"], [9, 2, 1, "", "pad"], [9, 2, 1, "", "permute"], [9, 3, 1, "", "rank"], [9, 2, 1, "", "read"], [9, 2, 1, "", "relu"], [9, 2, 1, "", "reshape"], [9, 2, 1, "", "reshapeDomain"], [9, 3, 1, "", "resource"], [9, 2, 1, "", "serialize"], [9, 2, 1, "", "shrink"], [9, 2, 1, "", "slice"], [9, 2, 1, "", "softmax"], [9, 2, 1, "", "sum"], [9, 2, 1, "", "this"], [9, 2, 1, "", "unsqueeze"], [9, 2, 1, "", "zeros"]], "Types": [[13, 8, 1, "", "stdRange"]], "Utilities": [[11, 5, 1, "", "argsort"], [11, 9, 1, "", "cartesian"], [11, 6, 1, "", "debugPrint"], [11, 5, 1, "", "debugWrite"], [11, 5, 1, "", "domainFromShape"], [11, 5, 1, "", "emptyDomain"], [11, 5, 1, "", "err"], [11, 9, 1, "", "fastEach"], [11, 9, 1, "", "flatIter"], [11, 5, 1, "", "indexAt"], [11, 5, 1, "", "indexAtHelperMultiples"], [11, 5, 1, "", "indexAtHelperProd"], [11, 5, 1, "", "indexInShape"], [11, 6, 1, "", "loopGpuSupport"], [11, 5, 1, "", "nbase"], [11, 5, 1, "", "normalizeArray"], [11, 5, 1, "", "normalizeDomain"], [11, 5, 1, "", "rangeFromBound"], [11, 5, 1, "", "rangeFromStart"], [11, 5, 1, "", "rangesFromBounds"], [11, 5, 1, "", "rangesFromShape"]]}, "objtypes": {"0": "chpl:module", "1": "chpl:class", "2": "chpl:method", "3": "chpl:attribute", "4": "chpl:record", "5": "chpl:function", "6": "chpl:data", "7": "chpl:itermethod", "8": "chpl:type", "9": "chpl:iterfunction"}, "objnames": {"0": ["chpl", "module", " module"], "1": ["chpl", "class", " class"], "2": ["chpl", "method", " method"], "3": ["chpl", "attribute", " attribute"], "4": ["chpl", "record", " record"], "5": ["chpl", "function", " function"], "6": ["chpl", "data", " data"], "7": ["chpl", "itermethod", " itermethod"], "8": ["chpl", "type", " type"], "9": ["chpl", "iterfunction", " iterfunction"]}, "titleterms": {"chpldoc": 0, "document": 0, "indic": 0, "tabl": 0, "autograd": 1, "dynamictensor": 2, "loadnumpi": 3, "ndarrai": 4, "network": 5, "ordereddict": 6, "remot": 7, "simpledomain": 8, "statictensor": 9, "tensor": 10, "util": 11, "standard": 12, "type": 13}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.todo": 2, "sphinx": 60}, "alltitles": {"chpldoc documentation": [[0, "chpldoc-documentation"]], "Indices and tables": [[0, "indices-and-tables"]], "Autograd": [[1, "autograd"]], "DynamicTensor": [[2, "dynamictensor"]], "LoadNumpy": [[3, "loadnumpy"]], "NDArray": [[4, "ndarray"]], "Network": [[5, "network"]], "OrderedDict": [[6, "ordereddict"]], "Remote": [[7, "remote"]], "SimpleDomain": [[8, "simpledomain"]], "StaticTensor": [[9, "statictensor"]], "Tensor": [[10, "tensor"]], "Utilities": [[11, "utilities"]], "Standard": [[12, "standard"]], "Types": [[13, "types"]]}, "indexentries": {"autograd (module)": [[1, "module-Autograd"]], "basetensorresource (class in autograd)": [[1, "Autograd.BaseTensorResource"]], "forgetfultensor (class in autograd)": [[1, "Autograd.ForgetfulTensor"]], "tensoressence (class in autograd)": [[1, "Autograd.TensorEssence"]], "tensorresource (class in autograd)": [[1, "Autograd.TensorResource"]], "_loc() (autograd.basetensorresource method)": [[1, "Autograd.BaseTensorResource._loc"]], "_relu() (autograd.reluop method)": [[1, "Autograd.reluOp._relu"]], "addop (record in autograd)": [[1, "Autograd.addOp"]], "arg (autograd.padop attribute)": [[1, "Autograd.padOp.arg"]], "arg (autograd.shrinkop attribute)": [[1, "Autograd.shrinkOp.arg"]], "array() (autograd.basetensorresource method)": [[1, "Autograd.BaseTensorResource.array"]], "axes (autograd.maxop attribute)": [[1, "Autograd.maxOp.axes"]], "axes (autograd.sumop attribute)": [[1, "Autograd.sumOp.axes"]], "backward() (autograd.basetensorresource method)": [[1, "Autograd.BaseTensorResource.backward"]], "backward() (autograd.tensorresource method)": [[1, "Autograd.TensorResource.backward"]], "backward() (autograd.addop method)": [[1, "Autograd.addOp.backward"]], "backward() (autograd.conv2dop method)": [[1, "Autograd.conv2DOp.backward"]], "backward() (autograd.expandop method)": [[1, "Autograd.expandOp.backward"]], "backward() (autograd.layersliceop method)": [[1, "Autograd.layerSliceOp.backward"]], "backward() (autograd.maxop method)": [[1, "Autograd.maxOp.backward"]], "backward() (autograd.multop method)": [[1, "Autograd.multOp.backward"]], "backward() (autograd.padop method)": [[1, "Autograd.padOp.backward"]], "backward() (autograd.permuteop method)": [[1, "Autograd.permuteOp.backward"]], "backward() (autograd.reshapeop method)": [[1, "Autograd.reshapeOp.backward"]], "backward() (autograd.shrinkop method)": [[1, "Autograd.shrinkOp.backward"]], "backward() (autograd.sliceop method)": [[1, "Autograd.sliceOp.backward"]], "backward() (autograd.sumop method)": [[1, "Autograd.sumOp.backward"]], "base (autograd.layersliceop attribute)": [[1, "Autograd.layerSliceOp.base"]], "basevalue (record in autograd)": [[1, "Autograd.baseValue"]], "checkrank() (in module autograd)": [[1, "Autograd.checkRank"]], "children() (autograd.addop method)": [[1, "Autograd.addOp.children"]], "children() (autograd.basevalue method)": [[1, "Autograd.baseValue.children"]], "children() (autograd.conv2dop method)": [[1, "Autograd.conv2DOp.children"]], "children() (autograd.expop method)": [[1, "Autograd.expOp.children"]], "children() (autograd.expandop method)": [[1, "Autograd.expandOp.children"]], "children() (autograd.layersliceop method)": [[1, "Autograd.layerSliceOp.children"]], "children() (autograd.maxop method)": [[1, "Autograd.maxOp.children"]], "children() (autograd.multop method)": [[1, "Autograd.multOp.children"]], "children() (autograd.padop method)": [[1, "Autograd.padOp.children"]], "children() (autograd.permuteop method)": [[1, "Autograd.permuteOp.children"]], "children() (autograd.reluop method)": [[1, "Autograd.reluOp.children"]], "children() (autograd.reshapeop method)": [[1, "Autograd.reshapeOp.children"]], "children() (autograd.shrinkop method)": [[1, "Autograd.shrinkOp.children"]], "children() (autograd.sliceop method)": [[1, "Autograd.sliceOp.children"]], "children() (autograd.sumop method)": [[1, "Autograd.sumOp.children"]], "conv2dop (record in autograd)": [[1, "Autograd.conv2DOp"]], "data() (autograd.basetensorresource method)": [[1, "Autograd.BaseTensorResource.data"]], "dataresource (autograd.basetensorresource attribute)": [[1, "Autograd.BaseTensorResource.dataResource"]], "device() (autograd.basetensorresource method)": [[1, "Autograd.BaseTensorResource.device"]], "divop (record in autograd)": [[1, "Autograd.divOp"]], "dom (autograd.sliceop attribute)": [[1, "Autograd.sliceOp.dom"]], "elttype (autograd.tensoressence attribute)": [[1, "Autograd.TensorEssence.eltType"]], "elttype (autograd.addop attribute)": [[1, "Autograd.addOp.eltType"]], "elttype (autograd.conv2dop attribute)": [[1, "Autograd.conv2DOp.eltType"]], "elttype (autograd.expandop attribute)": [[1, "Autograd.expandOp.eltType"]], "elttype (autograd.layersliceop attribute)": [[1, "Autograd.layerSliceOp.eltType"]], "elttype (autograd.maxop attribute)": [[1, "Autograd.maxOp.eltType"]], "elttype (autograd.multop attribute)": [[1, "Autograd.multOp.eltType"]], "elttype (autograd.padop attribute)": [[1, "Autograd.padOp.eltType"]], "elttype (autograd.permuteop attribute)": [[1, "Autograd.permuteOp.eltType"]], "elttype (autograd.reshapeop attribute)": [[1, "Autograd.reshapeOp.eltType"]], "elttype (autograd.shrinkop attribute)": [[1, "Autograd.shrinkOp.eltType"]], "elttype (autograd.sliceop attribute)": [[1, "Autograd.sliceOp.eltType"]], "elttype (autograd.sumop attribute)": [[1, "Autograd.sumOp.eltType"]], "expop (record in autograd)": [[1, "Autograd.expOp"]], "expandop (record in autograd)": [[1, "Autograd.expandOp"]], "expandedshape (autograd.expandop attribute)": [[1, "Autograd.expandOp.expandedShape"]], "features (autograd.conv2dop attribute)": [[1, "Autograd.conv2DOp.features"]], "forcerank() (in module autograd)": [[1, "Autograd.forceRank"]], "forward() (autograd.basetensorresource method)": [[1, "Autograd.BaseTensorResource.forward"]], "forward() (autograd.tensorresource method)": [[1, "Autograd.TensorResource.forward"]], "forward() (autograd.addop method)": [[1, "Autograd.addOp.forward"]], "forward() (autograd.basevalue method)": [[1, "Autograd.baseValue.forward"]], "forward() (autograd.conv2dop method)": [[1, "Autograd.conv2DOp.forward"]], "forward() (autograd.divop method)": [[1, "Autograd.divOp.forward"]], "forward() (autograd.expop method)": [[1, "Autograd.expOp.forward"]], "forward() (autograd.expandop method)": [[1, "Autograd.expandOp.forward"]], "forward() (autograd.layersliceop method)": [[1, "Autograd.layerSliceOp.forward"]], "forward() (autograd.maxop method)": [[1, "Autograd.maxOp.forward"]], "forward() (autograd.multop method)": [[1, "Autograd.multOp.forward"]], "forward() (autograd.padop method)": [[1, "Autograd.padOp.forward"]], "forward() (autograd.permuteop method)": [[1, "Autograd.permuteOp.forward"]], "forward() (autograd.reluop method)": [[1, "Autograd.reluOp.forward"]], "forward() (autograd.reshapeop method)": [[1, "Autograd.reshapeOp.forward"]], "forward() (autograd.shrinkop method)": [[1, "Autograd.shrinkOp.forward"]], "forward() (autograd.sliceop method)": [[1, "Autograd.sliceOp.forward"]], "forward() (autograd.subop method)": [[1, "Autograd.subOp.forward"]], "forward() (autograd.sumop method)": [[1, "Autograd.sumOp.forward"]], "getrank() (in module autograd)": [[1, "Autograd.getRank"]], "grad() (autograd.basetensorresource method)": [[1, "Autograd.BaseTensorResource.grad"]], "graddata() (autograd.basetensorresource method)": [[1, "Autograd.BaseTensorResource.gradData"]], "gradresource (autograd.basetensorresource attribute)": [[1, "Autograd.BaseTensorResource.gradResource"]], "init() (autograd.tensorresource method)": [[1, "Autograd.TensorResource.init"]], "input (autograd.expop attribute)": [[1, "Autograd.expOp.input"]], "input (autograd.expandop attribute)": [[1, "Autograd.expandOp.input"]], "input (autograd.maxop attribute)": [[1, "Autograd.maxOp.input"]], "input (autograd.padop attribute)": [[1, "Autograd.padOp.input"]], "input (autograd.permuteop attribute)": [[1, "Autograd.permuteOp.input"]], "input (autograd.reluop attribute)": [[1, "Autograd.reluOp.input"]], "input (autograd.reshapeop attribute)": [[1, "Autograd.reshapeOp.input"]], "input (autograd.shrinkop attribute)": [[1, "Autograd.shrinkOp.input"]], "input (autograd.sliceop attribute)": [[1, "Autograd.sliceOp.input"]], "input (autograd.sumop attribute)": [[1, "Autograd.sumOp.input"]], "kernel (autograd.conv2dop attribute)": [[1, "Autograd.conv2DOp.kernel"]], "layersliceop (record in autograd)": [[1, "Autograd.layerSliceOp"]], "lhs (autograd.addop attribute)": [[1, "Autograd.addOp.lhs"]], "lhs (autograd.divop attribute)": [[1, "Autograd.divOp.lhs"]], "lhs (autograd.multop attribute)": [[1, "Autograd.multOp.lhs"]], "lhs (autograd.subop attribute)": [[1, "Autograd.subOp.lhs"]], "mask (autograd.layersliceop attribute)": [[1, "Autograd.layerSliceOp.mask"]], "maskdomain (autograd.layersliceop attribute)": [[1, "Autograd.layerSliceOp.maskDomain"]], "maxop (record in autograd)": [[1, "Autograd.maxOp"]], "maxrank (autograd.maxop attribute)": [[1, "Autograd.maxOp.maxRank"]], "multop (record in autograd)": [[1, "Autograd.multOp"]], "newrank (autograd.reshapeop attribute)": [[1, "Autograd.reshapeOp.newRank"]], "oldrank (autograd.reshapeop attribute)": [[1, "Autograd.reshapeOp.oldRank"]], "operation (autograd.tensorresource attribute)": [[1, "Autograd.TensorResource.operation"]], "operationdata (autograd.tensorresource attribute)": [[1, "Autograd.TensorResource.operationData"]], "outrank() (autograd.sumop method)": [[1, "Autograd.sumOp.outRank"]], "padop (record in autograd)": [[1, "Autograd.padOp"]], "permutation (autograd.permuteop attribute)": [[1, "Autograd.permuteOp.permutation"]], "permuteop (record in autograd)": [[1, "Autograd.permuteOp"]], "rank (autograd.basetensorresource attribute)": [[1, "Autograd.BaseTensorResource.rank"]], "rank (autograd.forgetfultensor attribute)": [[1, "Autograd.ForgetfulTensor.rank"]], "rank (autograd.addop attribute)": [[1, "Autograd.addOp.rank"]], "rank (autograd.expandop attribute)": [[1, "Autograd.expandOp.rank"]], "rank (autograd.layersliceop attribute)": [[1, "Autograd.layerSliceOp.rank"]], "rank (autograd.maxop attribute)": [[1, "Autograd.maxOp.rank"]], "rank (autograd.multop attribute)": [[1, "Autograd.multOp.rank"]], "rank (autograd.padop attribute)": [[1, "Autograd.padOp.rank"]], "rank (autograd.permuteop attribute)": [[1, "Autograd.permuteOp.rank"]], "rank (autograd.shrinkop attribute)": [[1, "Autograd.shrinkOp.rank"]], "rank (autograd.sliceop attribute)": [[1, "Autograd.sliceOp.rank"]], "rank (autograd.sumop attribute)": [[1, "Autograd.sumOp.rank"]], "reluop (record in autograd)": [[1, "Autograd.reluOp"]], "reshapeop (record in autograd)": [[1, "Autograd.reshapeOp"]], "rhs (autograd.addop attribute)": [[1, "Autograd.addOp.rhs"]], "rhs (autograd.divop attribute)": [[1, "Autograd.divOp.rhs"]], "rhs (autograd.multop attribute)": [[1, "Autograd.multOp.rhs"]], "rhs (autograd.subop attribute)": [[1, "Autograd.subOp.rhs"]], "runtimerank() (autograd.basetensorresource method)": [[1, "Autograd.BaseTensorResource.runtimeRank"]], "runtimerank() (autograd.tensoressence method)": [[1, "Autograd.TensorEssence.runtimeRank"]], "shape (autograd.reshapeop attribute)": [[1, "Autograd.reshapeOp.shape"]], "shrinkop (record in autograd)": [[1, "Autograd.shrinkOp"]], "sliceop (record in autograd)": [[1, "Autograd.sliceOp"]], "stride (autograd.conv2dop attribute)": [[1, "Autograd.conv2DOp.stride"]], "subop (record in autograd)": [[1, "Autograd.subOp"]], "sumop (record in autograd)": [[1, "Autograd.sumOp"]], "sumrank (autograd.sumop attribute)": [[1, "Autograd.sumOp.sumRank"]], "to() (autograd.basetensorresource method)": [[1, "Autograd.BaseTensorResource.to"]], "value (autograd.padop attribute)": [[1, "Autograd.padOp.value"]], "*() (in module dynamictensor)": [[2, "DynamicTensor.*"]], "+() (in module dynamictensor)": [[2, "DynamicTensor.+"]], "-() (in module dynamictensor)": [[2, "DynamicTensor.-"]], ":() (in module dynamictensor)": [[2, "DynamicTensor.:"]], "dynamictensor (module)": [[2, "module-DynamicTensor"]], "tensor (record in dynamictensor)": [[2, "DynamicTensor.Tensor"]], "arange() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.arange"]], "argmax() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.argmax"]], "array() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.array"]], "checkrank() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.checkRank"]], "convolve() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.convolve"]], "data() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.data"]], "device() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.device"]], "elttype (dynamictensor.tensor attribute)": [[2, "DynamicTensor.Tensor.eltType"]], "eraserank() (dynamictensor.tensor method)": [[2, "DynamicTensor.tensor.eraseRank"]], "exp() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.exp"]], "flatten() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.flatten"]], "forcerank() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.forceRank"]], "forcerankmeta() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.forceRankMeta"]], "grad() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.grad"]], "hardcheckrank() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.hardCheckRank"]], "init() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.init"]], "load() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.load"]], "loadfromnumpy() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.loadFromNumpy"]], "main() (in module dynamictensor)": [[2, "DynamicTensor.main"]], "matvecmul() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.matvecmul"]], "matvecmulfast() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.matvecmulFast"]], "max() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.max"]], "maxpool() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.maxPool"]], "maxrank (in module dynamictensor)": [[2, "DynamicTensor.maxRank"]], "meta (dynamictensor.tensor attribute)": [[2, "DynamicTensor.Tensor.meta"]], "multireader() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.multiReader"]], "ones() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.ones"]], "readinplace() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.readInPlace"]], "relu() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.relu"]], "reshape() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.reshape"]], "resource() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.resource"]], "runtimerank (dynamictensor.tensor attribute)": [[2, "DynamicTensor.Tensor.runtimeRank"]], "save() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.save"]], "serialize() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.serialize"]], "slice() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.slice"]], "softmax() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.softmax"]], "sum() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.sum"]], "tensorize() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.tensorize"]], "this() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.this"]], "to() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.to"]], "toarray() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.toArray"]], "tondarray() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.toNDArray"]], "totensor() (dynamictensor.ndarray method)": [[2, "DynamicTensor.ndarray.toTensor"]], "write() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.write"]], "zeros() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.zeros"]], "zipbinop() (in module dynamictensor)": [[2, "DynamicTensor.zipBinOp"]], "arrclass (class in loadnumpy)": [[3, "LoadNumpy.ArrClass"]], "loadnumpy (module)": [[3, "module-LoadNumpy"]], "norankarray (class in loadnumpy)": [[3, "LoadNumpy.NoRankArray"]], "_domain (loadnumpy.arrclass attribute)": [[3, "LoadNumpy.ArrClass._domain"]], "data (loadnumpy.arrclass attribute)": [[3, "LoadNumpy.ArrClass.data"]], "loadnumpyarray() (in module loadnumpy)": [[3, "LoadNumpy.loadNumpyArray"]], "main() (in module loadnumpy)": [[3, "LoadNumpy.main"]], "rank (loadnumpy.arrclass attribute)": [[3, "LoadNumpy.ArrClass.rank"]], "readdata() (in module loadnumpy)": [[3, "LoadNumpy.readData"]], "readshape() (in module loadnumpy)": [[3, "LoadNumpy.readShape"]], "*() (in module ndarray)": [[4, "NDArray.*"]], "+() (in module ndarray)": [[4, "NDArray.+"]], "-() (in module ndarray)": [[4, "NDArray.-"]], "/() (in module ndarray)": [[4, "NDArray./"]], ":() (in module ndarray)": [[4, "NDArray.:"]], "=() (in module ndarray)": [[4, "NDArray.="]], "ndarray (module)": [[4, "module-NDArray"]], "ndarraydata (class in ndarray)": [[4, "NDArray.NDArrayData"]], "_domain (ndarray.ndarraydata attribute)": [[4, "NDArray.NDArrayData._domain"]], "_tensor_resource (class in ndarray)": [[4, "NDArray._tensor_resource"]], "arange() (ndarray.ndarray method)": [[4, "NDArray.ndarray.arange"]], "argmax() (ndarray.ndarray method)": [[4, "NDArray.ndarray.argmax"]], "arrayresource (ndarray.ndarray attribute)": [[4, "NDArray.ndarray.arrayResource"]], "batchify() (ndarray.ndarray iterator)": [[4, "NDArray.ndarray.batchify"]], "borrowresource() (ndarray.ndarray method)": [[4, "NDArray.ndarray.borrowResource"]], "contract() (ndarray.ndarray method)": [[4, "NDArray.ndarray.contract"]], "convolve() (ndarray.ndarray method)": [[4, "NDArray.ndarray.convolve"]], "data (ndarray.ndarraydata attribute)": [[4, "NDArray.NDArrayData.data"]], "data (ndarray._tensor_resource attribute)": [[4, "NDArray._tensor_resource.data"]], "data() (ndarray.ndarray method)": [[4, "NDArray.ndarray.data"]], "dilate() (ndarray.ndarray method)": [[4, "NDArray.ndarray.dilate"]], "drop() (in module ndarray)": [[4, "NDArray.drop"]], "einsum() (ndarray.ndarray method)": [[4, "NDArray.ndarray.einsum"]], "elttype (ndarray.ndarraydata attribute)": [[4, "NDArray.NDArrayData.eltType"]], "elttype (ndarray._tensor_resource attribute)": [[4, "NDArray._tensor_resource.eltType"]], "elttype (ndarray.ndarray attribute)": [[4, "NDArray.ndarray.eltType"]], "expand() (ndarray.ndarray method)": [[4, "NDArray.ndarray.expand"]], "fromranges() (ndarray.ndarray method)": [[4, "NDArray.ndarray.fromRanges"]], "fullouter() (ndarray.ndarray method)": [[4, "NDArray.ndarray.fullOuter"]], "getfirstidx() (in module ndarray)": [[4, "NDArray.getFirstIdx"]], "init() (ndarray.ndarraydata method)": [[4, "NDArray.NDArrayData.init"]], "init() (ndarray.ndarray method)": [[4, "NDArray.ndarray.init"]], "init() (ndarray.remote method)": [[4, "NDArray.remote.init"]], "init=() (ndarray.ndarray method)": [[4, "NDArray.ndarray.init="]], "init=() (ndarray.remote method)": [[4, "NDArray.remote.init="]], "kernelrot() (ndarray.ndarray method)": [[4, "NDArray.ndarray.kernelRot"]], "main() (in module ndarray)": [[4, "NDArray.main"]], "matvecmul() (ndarray.ndarray method)": [[4, "NDArray.ndarray.matvecmul"]], "max() (ndarray.ndarray method)": [[4, "NDArray.ndarray.max"]], "maxpool() (ndarray.ndarray method)": [[4, "NDArray.ndarray.maxPool"]], "ndarray (record in ndarray)": [[4, "NDArray.ndarray"]], "pad() (ndarray.ndarray method)": [[4, "NDArray.ndarray.pad"]], "permute() (ndarray.ndarray method)": [[4, "NDArray.ndarray.permute"]], "populateremote() (ndarray.ndarray method)": [[4, "NDArray.ndarray.populateRemote"]], "rank (ndarray.ndarraydata attribute)": [[4, "NDArray.NDArrayData.rank"]], "rank (ndarray._tensor_resource attribute)": [[4, "NDArray._tensor_resource.rank"]], "rank (ndarray.ndarray attribute)": [[4, "NDArray.ndarray.rank"]], "read() (ndarray.ndarray method)": [[4, "NDArray.ndarray.read"]], "relu() (ndarray.ndarray method)": [[4, "NDArray.ndarray.relu"]], "reshape() (ndarray.ndarray method)": [[4, "NDArray.ndarray.reshape"]], "reshapedomain() (ndarray.ndarray method)": [[4, "NDArray.ndarray.reshapeDomain"]], "resource() (ndarray.ndarray method)": [[4, "NDArray.ndarray.resource"]], "serialize() (ndarray.ndarray method)": [[4, "NDArray.ndarray.serialize"]], "setdata() (ndarray.ndarray method)": [[4, "NDArray.ndarray.setData"]], "shrink() (ndarray.ndarray method)": [[4, "NDArray.ndarray.shrink"]], "slice() (ndarray.ndarray method)": [[4, "NDArray.ndarray.slice"]], "slice() (in module ndarray)": [[4, "NDArray.slice"]], "slicegeneric() (in module ndarray)": [[4, "NDArray.sliceGeneric"]], "splitat() (in module ndarray)": [[4, "NDArray.splitAt"]], "squeeze() (ndarray.ndarray method)": [[4, "NDArray.ndarray.squeeze"]], "sum() (ndarray.ndarray method)": [[4, "NDArray.ndarray.sum"]], "sumaxesmask() (ndarray.ndarray method)": [[4, "NDArray.ndarray.sumAxesMask"]], "sumoneaxis() (ndarray.ndarray method)": [[4, "NDArray.ndarray.sumOneAxis"]], "take() (in module ndarray)": [[4, "NDArray.take"]], "this() (ndarray.ndarray method)": [[4, "NDArray.ndarray.this"]], "toremote() (ndarray.ndarray method)": [[4, "NDArray.ndarray.toRemote"]], "write() (ndarray.ndarray method)": [[4, "NDArray.ndarray.write"]], "ziparr() (in module ndarray)": [[4, "NDArray.zipArr"]], ":() (network.moduleattributes method)": [[5, "Network.moduleAttributes.:"]], "conv2d (class in network)": [[5, "Network.Conv2D"]], "dropout (class in network)": [[5, "Network.Dropout"]], "flatten (class in network)": [[5, "Network.Flatten"]], "linear (class in network)": [[5, "Network.Linear"]], "maxpool (class in network)": [[5, "Network.MaxPool"]], "module (class in network)": [[5, "Network.Module"]], "modulespecification (class in network)": [[5, "Network.ModuleSpecification"]], "net (class in network)": [[5, "Network.Net"]], "network (module)": [[5, "module-Network"]], "parameter (class in network)": [[5, "Network.Parameter"]], "relu (class in network)": [[5, "Network.ReLU"]], "sequential (class in network)": [[5, "Network.Sequential"]], "softmax (class in network)": [[5, "Network.Softmax"]], "add() (network.modulechildren method)": [[5, "Network.moduleChildren.add"]], "addmodule() (network.module method)": [[5, "Network.Module.addModule"]], "addparameter() (network.module method)": [[5, "Network.Module.addParameter"]], "attributes (network.modulespecification attribute)": [[5, "Network.ModuleSpecification.attributes"]], "attributes (network.moduleattributes attribute)": [[5, "Network.moduleAttributes.attributes"]], "attributes() (network.conv2d method)": [[5, "Network.Conv2D.attributes"]], "attributes() (network.dropout method)": [[5, "Network.Dropout.attributes"]], "attributes() (network.flatten method)": [[5, "Network.Flatten.attributes"]], "attributes() (network.linear method)": [[5, "Network.Linear.attributes"]], "attributes() (network.maxpool method)": [[5, "Network.MaxPool.attributes"]], "attributes() (network.module method)": [[5, "Network.Module.attributes"]], "attributes() (network.parameter method)": [[5, "Network.Parameter.attributes"]], "attributes() (network.relu method)": [[5, "Network.ReLU.attributes"]], "attributes() (network.sequential method)": [[5, "Network.Sequential.attributes"]], "attributes() (network.softmax method)": [[5, "Network.Softmax.attributes"]], "bias (network.conv2d attribute)": [[5, "Network.Conv2D.bias"]], "bias (network.linear attribute)": [[5, "Network.Linear.bias"]], "chain() (in module network)": [[5, "Network.chain"]], "childdict (network.modulechildren attribute)": [[5, "Network.moduleChildren.childDict"]], "data (network.parameter attribute)": [[5, "Network.Parameter.data"]], "elttype (network.module attribute)": [[5, "Network.Module.eltType"]], "elttype (network.modulechildren attribute)": [[5, "Network.moduleChildren.eltType"]], "forward() (network.conv2d method)": [[5, "Network.Conv2D.forward"]], "forward() (network.dropout method)": [[5, "Network.Dropout.forward"]], "forward() (network.flatten method)": [[5, "Network.Flatten.forward"]], "forward() (network.linear method)": [[5, "Network.Linear.forward"]], "forward() (network.maxpool method)": [[5, "Network.MaxPool.forward"]], "forward() (network.module method)": [[5, "Network.Module.forward"]], "forward() (network.net method)": [[5, "Network.Net.forward"]], "forward() (network.relu method)": [[5, "Network.ReLU.forward"]], "forward() (network.sequential method)": [[5, "Network.Sequential.forward"]], "forward() (network.softmax method)": [[5, "Network.Softmax.forward"]], "getint() (network.moduleattributes method)": [[5, "Network.moduleAttributes.getInt"]], "getsubmodulename() (network.module method)": [[5, "Network.Module.getSubModuleName"]], "helpfindmodulebyname() (in module network)": [[5, "Network.helpFindModuleByName"]], "helpfindparamdatabyname() (in module network)": [[5, "Network.helpFindParamDataByName"]], "init() (network.conv2d method)": [[5, "Network.Conv2D.init"]], "init() (network.dropout method)": [[5, "Network.Dropout.init"]], "init() (network.flatten method)": [[5, "Network.Flatten.init"]], "init() (network.linear method)": [[5, "Network.Linear.init"]], "init() (network.maxpool method)": [[5, "Network.MaxPool.init"]], "init() (network.module method)": [[5, "Network.Module.init"]], "init() (network.net method)": [[5, "Network.Net.init"]], "init() (network.parameter method)": [[5, "Network.Parameter.init"]], "init() (network.relu method)": [[5, "Network.ReLU.init"]], "init() (network.sequential method)": [[5, "Network.Sequential.init"]], "init() (network.softmax method)": [[5, "Network.Softmax.init"]], "init() (network.moduleattributes method)": [[5, "Network.moduleAttributes.init"]], "init() (network.modulechildren method)": [[5, "Network.moduleChildren.init"]], "items() (network.modulechildren iterator)": [[5, "Network.moduleChildren.items"]], "ith() (network.modulechildren method)": [[5, "Network.moduleChildren.ith"]], "kernel (network.conv2d attribute)": [[5, "Network.Conv2D.kernel"]], "kernelshape (network.conv2d attribute)": [[5, "Network.Conv2D.kernelShape"]], "layertype (network.modulespecification attribute)": [[5, "Network.ModuleSpecification.layerType"]], "layertype (network.moduleattributes attribute)": [[5, "Network.moduleAttributes.layerType"]], "loadpytorchdump() (network.module method)": [[5, "Network.Module.loadPyTorchDump"]], "m (network.linear attribute)": [[5, "Network.Linear.m"]], "main() (in module network)": [[5, "Network.main"]], "mds (network.sequential attribute)": [[5, "Network.Sequential.mds"]], "mod() (network.module method)": [[5, "Network.Module.mod"]], "modelfromspecfile() (in module network)": [[5, "Network.modelFromSpecFile"]], "moduleattributes (record in network)": [[5, "Network.moduleAttributes"]], "modulechildren (record in network)": [[5, "Network.moduleChildren"]], "modulefieldnames() (network.class iterator)": [[5, "Network.class.moduleFieldNames"]], "modulefields() (network.class iterator)": [[5, "Network.class.moduleFields"]], "modulefromspec() (in module network)": [[5, "Network.moduleFromSpec"]], "moduleid (network.module attribute)": [[5, "Network.Module.moduleId"]], "moduleinstances (in module network)": [[5, "Network.moduleInstances"]], "modulename (network.module attribute)": [[5, "Network.Module.moduleName"]], "modulename (network.moduleattributes attribute)": [[5, "Network.moduleAttributes.moduleName"]], "modulenames() (network.module iterator)": [[5, "Network.Module.moduleNames"]], "modules() (network.module iterator)": [[5, "Network.Module.modules"]], "n (network.linear attribute)": [[5, "Network.Linear.n"]], "namedmodules() (network.module iterator)": [[5, "Network.Module.namedModules"]], "order (network.modulechildren attribute)": [[5, "Network.moduleChildren.order"]], "ownedmodules (network.module attribute)": [[5, "Network.Module.ownedModules"]], "par() (network.module method)": [[5, "Network.Module.par"]], "parameternames() (network.module iterator)": [[5, "Network.Module.parameterNames"]], "parameters() (network.module iterator)": [[5, "Network.Module.parameters"]], "poolsize (network.maxpool attribute)": [[5, "Network.MaxPool.poolSize"]], "postinit() (network.class method)": [[5, "Network.class.postinit"]], "prettyprint() (network.moduleattributes method)": [[5, "Network.moduleAttributes.prettyPrint"]], "prettyprintspec() (network.moduleattributes method)": [[5, "Network.moduleAttributes.prettyPrintSpec"]], "registermodules() (network.class method)": [[5, "Network.class.registerModules"]], "setup() (network.conv2d method)": [[5, "Network.Conv2D.setup"]], "setup() (network.linear method)": [[5, "Network.Linear.setup"]], "setup() (network.module method)": [[5, "Network.Module.setup"]], "signature() (network.module method)": [[5, "Network.Module.signature"]], "stride (network.conv2d attribute)": [[5, "Network.Conv2D.stride"]], "submoduleorder (network.modulespecification attribute)": [[5, "Network.ModuleSpecification.subModuleOrder"]], "submodules (network.module attribute)": [[5, "Network.Module.subModules"]], "submodules (network.modulespecification attribute)": [[5, "Network.ModuleSpecification.subModules"]], "these() (network.modulechildren iterator)": [[5, "Network.moduleChildren.these"]], "this() (network.module method)": [[5, "Network.Module.this"]], "this() (network.class method)": [[5, "Network.class.this"]], "weight (network.linear attribute)": [[5, "Network.Linear.weight"]], "ordereddict (module)": [[6, "module-OrderedDict"]], "dict (record in ordereddict)": [[6, "OrderedDict.dict"]], "init() (ordereddict.dict method)": [[6, "OrderedDict.dict.init"]], "insert() (ordereddict.dict method)": [[6, "OrderedDict.dict.insert"]], "keytype (ordereddict.dict attribute)": [[6, "OrderedDict.dict.keyType"]], "keys() (ordereddict.dict iterator)": [[6, "OrderedDict.dict.keys"]], "order (ordereddict.dict attribute)": [[6, "OrderedDict.dict.order"]], "size() (ordereddict.dict method)": [[6, "OrderedDict.dict.size"]], "table (ordereddict.dict attribute)": [[6, "OrderedDict.dict.table"]], "these() (ordereddict.dict iterator)": [[6, "OrderedDict.dict.these"]], "valtype (ordereddict.dict attribute)": [[6, "OrderedDict.dict.valType"]], "values() (ordereddict.dict iterator)": [[6, "OrderedDict.dict.values"]], "remote (class in remote)": [[7, "Remote.Remote"]], "remote (module)": [[7, "module-Remote"]], "access() (remote.remote method)": [[7, "Remote.remote.access"]], "copy() (remote.remote method)": [[7, "Remote.remote.copy"]], "debug (in module remote)": [[7, "Remote.debug"]], "defaultdevice (in module remote)": [[7, "Remote.defaultDevice"]], "device (remote.remote attribute)": [[7, "Remote.Remote.device"]], "device() (remote.remote method)": [[7, "Remote.remote.device"]], "download() (remote.remote method)": [[7, "Remote.remote.download"]], "elttype (remote.remote attribute)": [[7, "Remote.Remote.eltType"], [7, "Remote.remote.eltType"]], "get() (remote.remote method)": [[7, "Remote.Remote.get"], [7, "Remote.remote.get"]], "init() (remote.remote method)": [[7, "Remote.Remote.init"], [7, "Remote.remote.init"]], "item (remote.remote attribute)": [[7, "Remote.Remote.item"]], "localaccess() (remote.remote method)": [[7, "Remote.remote.localAccess"]], "remote (record in remote)": [[7, "Remote.remote"]], "remoteresource (remote.remote attribute)": [[7, "Remote.remote.remoteResource"]], "serialize() (remote.remote method)": [[7, "Remote.Remote.serialize"]], "to() (remote.remote method)": [[7, "Remote.Remote.to"], [7, "Remote.remote.to"]], "unload() (remote.remote method)": [[7, "Remote.remote.unload"]], "simpledomain (module)": [[8, "module-SimpleDomain"]], "init() (simpledomain.rect method)": [[8, "SimpleDomain.rect.init"]], "offset (simpledomain.rect attribute)": [[8, "SimpleDomain.rect.offset"]], "rank (simpledomain.rect attribute)": [[8, "SimpleDomain.rect.rank"]], "rect (record in simpledomain)": [[8, "SimpleDomain.rect"]], "shape (simpledomain.rect attribute)": [[8, "SimpleDomain.rect.shape"]], "size() (simpledomain.rect method)": [[8, "SimpleDomain.rect.size"]], "zerotup() (in module simpledomain)": [[8, "SimpleDomain.zeroTup"]], "*() (in module statictensor)": [[9, "StaticTensor.*"]], "+() (in module statictensor)": [[9, "StaticTensor.+"]], "-() (in module statictensor)": [[9, "StaticTensor.-"]], "/() (in module statictensor)": [[9, "StaticTensor./"]], "statictensor (module)": [[9, "module-StaticTensor"]], "_dom() (statictensor.tensor method)": [[9, "StaticTensor.tensor._dom"]], "_setarraydata() (statictensor.tensor method)": [[9, "StaticTensor.tensor._setArrayData"]], "arange() (statictensor.tensor method)": [[9, "StaticTensor.tensor.arange"]], "convolve() (statictensor.tensor method)": [[9, "StaticTensor.tensor.convolve"]], "diag (in module statictensor)": [[9, "StaticTensor.diag"]], "dilate() (statictensor.tensor method)": [[9, "StaticTensor.tensor.dilate"]], "elttype (statictensor.tensor attribute)": [[9, "StaticTensor.tensor.eltType"]], "exp() (statictensor.tensor method)": [[9, "StaticTensor.tensor.exp"]], "expand() (statictensor.tensor method)": [[9, "StaticTensor.tensor.expand"]], "fromshape() (statictensor.tensor method)": [[9, "StaticTensor.tensor.fromShape"]], "init() (statictensor.tensor method)": [[9, "StaticTensor.tensor.init"]], "main() (in module statictensor)": [[9, "StaticTensor.main"]], "matvec() (in module statictensor)": [[9, "StaticTensor.matvec"]], "matvecmul() (statictensor.tensor method)": [[9, "StaticTensor.tensor.matvecmul"]], "matvecmulfast() (statictensor.tensor method)": [[9, "StaticTensor.tensor.matvecmulFast"]], "max() (statictensor.tensor method)": [[9, "StaticTensor.tensor.max"]], "maxpool() (statictensor.tensor method)": [[9, "StaticTensor.tensor.maxPool"]], "meta() (statictensor.tensor method)": [[9, "StaticTensor.tensor.meta"]], "n (in module statictensor)": [[9, "StaticTensor.n"]], "ones() (statictensor.tensor method)": [[9, "StaticTensor.tensor.ones"]], "pad() (statictensor.tensor method)": [[9, "StaticTensor.tensor.pad"]], "permute() (statictensor.tensor method)": [[9, "StaticTensor.tensor.permute"]], "rank (statictensor.tensor attribute)": [[9, "StaticTensor.tensor.rank"]], "read() (statictensor.tensor method)": [[9, "StaticTensor.tensor.read"]], "relu() (statictensor.tensor method)": [[9, "StaticTensor.tensor.relu"]], "reshape() (statictensor.tensor method)": [[9, "StaticTensor.tensor.reshape"]], "reshapedomain() (statictensor.tensor method)": [[9, "StaticTensor.tensor.reshapeDomain"]], "resource (statictensor.tensor attribute)": [[9, "StaticTensor.tensor.resource"]], "serialize() (statictensor.tensor method)": [[9, "StaticTensor.tensor.serialize"]], "shrink() (statictensor.tensor method)": [[9, "StaticTensor.tensor.shrink"]], "size (in module statictensor)": [[9, "StaticTensor.size"]], "slice() (statictensor.tensor method)": [[9, "StaticTensor.tensor.slice"]], "softmax() (statictensor.tensor method)": [[9, "StaticTensor.tensor.softmax"]], "sum() (statictensor.tensor method)": [[9, "StaticTensor.tensor.sum"]], "tensor (record in statictensor)": [[9, "StaticTensor.tensor"]], "tensorfromctx() (in module statictensor)": [[9, "StaticTensor.tensorFromCtx"]], "this() (statictensor.tensor method)": [[9, "StaticTensor.tensor.this"]], "unsqueeze() (statictensor.tensor method)": [[9, "StaticTensor.tensor.unsqueeze"]], "zeros() (statictensor.tensor method)": [[9, "StaticTensor.tensor.zeros"]], "tensor (module)": [[10, "module-Tensor"]], "utilities (module)": [[11, "module-Utilities"]], "argsort() (in module utilities)": [[11, "Utilities.argsort"]], "cartesian() (in module utilities)": [[11, "Utilities.cartesian"]], "debugprint (in module utilities)": [[11, "Utilities.debugPrint"]], "debugwrite() (in module utilities)": [[11, "Utilities.debugWrite"]], "domainfromshape() (in module utilities)": [[11, "Utilities.domainFromShape"]], "emptydomain() (in module utilities)": [[11, "Utilities.emptyDomain"]], "err() (in module utilities)": [[11, "Utilities.err"]], "fasteach() (in module utilities)": [[11, "Utilities.fastEach"]], "flatiter() (in module utilities)": [[11, "Utilities.flatIter"]], "indexat() (in module utilities)": [[11, "Utilities.indexAt"]], "indexathelpermultiples() (in module utilities)": [[11, "Utilities.indexAtHelperMultiples"]], "indexathelperprod() (in module utilities)": [[11, "Utilities.indexAtHelperProd"]], "indexinshape() (in module utilities)": [[11, "Utilities.indexInShape"]], "loopgpusupport (in module utilities)": [[11, "Utilities.loopGpuSupport"]], "nbase() (in module utilities)": [[11, "Utilities.nbase"]], "normalizearray() (in module utilities)": [[11, "Utilities.normalizeArray"]], "normalizedomain() (in module utilities)": [[11, "Utilities.normalizeDomain"]], "rangefrombound() (in module utilities)": [[11, "Utilities.rangeFromBound"]], "rangefromstart() (in module utilities)": [[11, "Utilities.rangeFromStart"]], "rangesfrombounds() (in module utilities)": [[11, "Utilities.rangesFromBounds"]], "rangesfromshape() (in module utilities)": [[11, "Utilities.rangesFromShape"]], "standard (module)": [[12, "module-Standard"]], "countoccurrences() (standard.string method)": [[12, "Standard.string.countOccurrences"]], "drop() (standard.string method)": [[12, "Standard.string.drop"]], "each() (standard._domain iterator)": [[12, "Standard._domain.each"]], "each() (standard._tuple iterator)": [[12, "Standard._tuple.each"]], "elttype() (standard._tuple method)": [[12, "Standard._tuple.eltType"]], "every() (standard._domain iterator)": [[12, "Standard._domain.every"]], "everyzip() (standard._domain iterator)": [[12, "Standard._domain.everyZip"]], "fastshape() (standard._domain method)": [[12, "Standard._domain.fastShape"]], "imagetype() (standard._tuple method)": [[12, "Standard._tuple.imageType"]], "indexat() (standard._domain method)": [[12, "Standard._domain.indexAt"]], "indexat() (standard._tuple method)": [[12, "Standard._tuple.indexAt"]], "insertidx() (standard._tuple method)": [[12, "Standard._tuple.insertIdx"]], "isnormal() (standard._domain method)": [[12, "Standard._domain.isNormal"]], "map() (standard._tuple method)": [[12, "Standard._tuple.map"]], "myshape() (standard._domain method)": [[12, "Standard._domain.myShape"]], "normalize() (standard._domain method)": [[12, "Standard._domain.normalize"]], "removeidx() (standard._tuple method)": [[12, "Standard._tuple.removeIdx"]], "slice() (standard._tuple method)": [[12, "Standard._tuple.slice"]], "slice() (standard.string method)": [[12, "Standard.string.slice"]], "take() (standard.string method)": [[12, "Standard.string.take"]], "takeuntil() (standard.string method)": [[12, "Standard.string.takeUntil"]], "this() (standard.string method)": [[12, "Standard.string.this"]], "untuplify() (standard._tuple method)": [[12, "Standard._tuple.untuplify"]], "types (module)": [[13, "module-Types"]], "stdrange (in module types)": [[13, "Types.stdRange"]]}}) \ No newline at end of file +Search.setIndex({"docnames": ["index", "modules/lib/Autograd", "modules/lib/DynamicTensor", "modules/lib/LoadNumpy", "modules/lib/NDArray", "modules/lib/Network", "modules/lib/OrderedDict", "modules/lib/Remote", "modules/lib/SimpleDomain", "modules/lib/StaticTensor", "modules/lib/Tensor", "modules/lib/Utilities", "modules/lib/Utilities/Standard", "modules/lib/Utilities/Types"], "filenames": ["index.rst", "modules/lib/Autograd.rst", "modules/lib/DynamicTensor.rst", "modules/lib/LoadNumpy.rst", "modules/lib/NDArray.rst", "modules/lib/Network.rst", "modules/lib/OrderedDict.rst", "modules/lib/Remote.rst", "modules/lib/SimpleDomain.rst", "modules/lib/StaticTensor.rst", "modules/lib/Tensor.rst", "modules/lib/Utilities.rst", "modules/lib/Utilities/Standard.rst", "modules/lib/Utilities/Types.rst"], "titles": ["chpldoc documentation", "Autograd", "DynamicTensor", "LoadNumpy", "NDArray", "Network", "OrderedDict", "Remote", "SimpleDomain", "StaticTensor", "Tensor", "Utilities", "Standard", "Types"], "terms": {"content": 0, "autograd": 0, "dynamictensor": 0, "loadnumpi": 0, "ndarrai": [0, 1, 2, 9], "network": 0, "ordereddict": 0, "remot": [0, 1, 4], "simpledomain": 0, "statictensor": 0, "tensor": [0, 2, 5, 9], "util": [0, 12, 13], "standard": [0, 11], "type": [0, 1, 2, 4, 5, 6, 7, 9, 11, 12], "index": 0, "chapel": 0, "modul": [0, 5], "search": 0, "page": 0, "usag": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], "us": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], "import": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], "proc": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12], "checkrank": [1, 2], "te": 1, "share": [1, 2, 5, 7, 9], "tensoress": [1, 2], "elttyp": [1, 2, 4, 5, 7, 9, 12], "param": [1, 2, 3, 4, 5, 8, 9, 11, 12], "rank": [1, 2, 3, 4, 5, 8, 9, 11, 12], "int": [1, 2, 3, 4, 5, 6, 8, 9, 11, 12, 13], "bool": [1, 2, 9, 11, 12], "getrank": 1, "forcerank": [1, 2], "basetensorresourc": [1, 2, 9], "class": [1, 3, 4, 5, 7], "serializ": [1, 2, 4, 5, 6, 7, 9], "real": [1, 2, 3, 4, 5, 9, 13], "runtimerank": [1, 2], "forgetfultensor": 1, "var": [1, 2, 3, 4, 5, 6, 7, 8, 9], "dataresourc": 1, "gradresourc": 1, "device_": [], "local": [1, 2, 7], "devic": [1, 2, 7], "forward": [1, 5], "backward": 1, "grad": [1, 2], "alreadypopul": 1, "fals": [1, 2, 4, 5, 9, 11, 12], "where": [1, 2, 4, 5, 7, 9, 11, 12], "1": [1, 2, 4, 5, 9, 11, 12], "arrai": [1, 2, 9], "ref": [1, 2, 4, 5, 6, 7, 9], "data": [1, 2, 3, 4, 5], "graddata": [], "_loc": [], "overrid": [1, 5], "tensorresourc": 1, "oper": [2, 4, 5, 9], "operationdata": [], "init": [1, 2, 4, 5, 6, 7, 8, 9], "resourc": [2, 9], "defaultdevic": [1, 7], "record": [1, 2, 4, 5, 6, 8, 9], "basevalu": 1, "children": 1, "reluop": 1, "input": [1, 5], "_relu": 1, "x": [1, 5, 11, 12], "expop": 1, "addop": 1, "lh": [1, 4], "rh": [1, 4], "subop": 1, "divop": 1, "multop": 1, "reshapeop": 1, "oldrank": 1, "newrank": [1, 4, 9], "shape": [1, 3, 4, 8, 9, 11], "permuteop": 1, "permut": [1, 4, 9], "expandop": 1, "expandedshap": 1, "padop": 1, "arg": [1, 2, 4, 5, 9, 11], "2": [1, 4, 9, 11], "valu": [1, 4, 6, 7, 9], "shrinkop": 1, "sliceop": 1, "dom": [1, 2, 4, 9, 11], "domain": [1, 2, 3, 4, 9, 11], "layersliceop": 1, "base": 1, "mask": 1, "maskdomain": 1, "sumop": 1, "sumrank": 1, "ax": [1, 2, 4, 9], "outrank": 1, "maxop": 1, "maxrank": [1, 2], "conv2dop": 1, "featur": [1, 2, 4, 5, 9], "3": [1, 4, 9], "kernel": [1, 2, 4, 5, 9], "4": [1, 4, 5, 9], "stride": [1, 2, 4, 5, 9, 13], "config": [1, 2, 3, 4, 5, 6, 7, 8, 9], "6": 2, "meta": [2, 9], "t": [2, 4, 5, 9, 11], "arr": [2, 4, 9, 11], "thi": [2, 4, 5, 9, 12], "forcerankmeta": 2, "hardcheckrank": 2, "tondarrai": 2, "toarrai": 2, "totensor": 2, "eraserank": 2, "zipbinop": 2, "opnam": 2, "string": [2, 3, 4, 5, 12], "b": [2, 4, 9], "loadfromnumpi": 2, "path": [2, 3, 5], "sum": [2, 4, 9], "r": [2, 9], "relu": [2, 4, 5, 9], "max": [2, 4, 9], "exp": [2, 9], "softmax": [2, 5, 9], "maxpool": [2, 4, 5, 9], "poolsiz": [2, 4, 5, 9], "reshap": [2, 4, 9], "slice": [2, 4, 9, 12], "rng": [2, 4, 9], "rang": [2, 4, 9, 11, 13], "flatten": [2, 5], "matvecmul": [2, 4, 9], "m": [2, 5, 9], "v": [2, 9], "matvecmulfast": [2, 9], "argmax": [2, 4], "convolv": [2, 4, 9], "bia": [2, 4, 5, 9], "arang": [2, 4, 9], "ones": [2, 9], "zero": [2, 9], "main": [2, 3, 4, 5, 9], "serial": [2, 4, 9], "writer": [2, 4, 9], "io": [2, 4, 9], "filewrit": [2, 4, 9], "lock": [2, 4, 9], "defaultseri": [2, 4, 9], "srt2": [2, 9], "write": [2, 4], "fw": [2, 4], "throw": [2, 4, 9], "save": 2, "multiread": 2, "load": 2, "precis": 2, "64": [2, 4, 9, 13], "readinplac": 2, "fr": [2, 3, 4, 9], "fileread": [2, 4, 9], "norankarrai": 3, "arrclass": 3, "_domain": [3, 4, 12], "readdata": 3, "dtype": [3, 5], "byte": 3, "own": [1, 3, 4, 5, 7, 9], "readshap": 3, "loadnumpyarrai": 3, "ndarraydata": [], "emptydomain": 11, "noinit": 4, "A": 4, "me": [], "arrayresourc": [], "borrowresourc": [], "borrow": [1, 4, 5], "isdomaintyp": 4, "isnorm": 12, "true": [1, 2, 9], "_iteratorrecord": [4, 9], "other": 4, "setdata": 4, "reshapedomain": [4, 9], "newshap": [4, 9], "expand": [4, 9], "sumoneaxi": 4, "axi": 4, "sumaxesmask": 4, "withaxesmask": 4, "axescount": 4, "shrink": [4, 9], "narg": 4, "exactbound": 4, "pad": [4, 9], "0": [4, 5, 9, 12], "dilat": [4, 9], "dil": [4, 9], "squeez": 4, "populateremot": 4, "re": 4, "toremot": 4, "iter": [1, 4, 5, 6, 11, 12], "batchifi": 4, "dim": [4, 9], "kernelrot": 4, "d": 11, "val": 4, "ziparr": 4, "f": [4, 12], "mat": [4, 9], "vec": [4, 9], "fromrang": 4, "read": [4, 9], "_tensor_resourc": 4, "fullout": 4, "ranka": 4, "rankb": 4, "contract": 4, "axisa": 4, "axisb": 4, "splitat": 4, "": 4, "del": [4, 12], "idx": [4, 12], "getfirstidx": 4, "slicegener": 4, "start": [4, 11, 12], "stop": [4, 12], "take": [4, 12], "count": [4, 11, 12], "drop": [4, 12], "einsum": 4, "subscript": 4, "helpfindmodulebynam": 5, "helpfindparamdatabynam": 5, "modulechildren": 5, "childdict": 5, "map": [5, 6, 12], "order": [5, 6], "list": [5, 6], "item": 5, "add": 5, "name": 5, "ith": 5, "i": 5, "fieldnam": 5, "issubtyp": [5, 7], "paramet": 5, "modulefieldnam": 5, "modulefield": 5, "registermodul": 5, "postinit": 5, "moduleattribut": 5, "layertyp": 5, "modulenam": 5, "attribut": 5, "dict": [5, 6], "attr": 5, "valtyp": [5, 6], "n": [5, 9, 11, 12], "getint": 5, "prettyprint": 5, "prettyprintspec": 5, "ma": 5, "modulespecif": 5, "submodul": [5, 11], "submoduleord": 5, "modulefromspec": 5, "ms_": 5, "modelfromspecfil": 5, "moduleinst": 5, "moduleid": 5, "ownedmodul": 5, "setup": 5, "getsubmodulenam": 5, "addmodul": 5, "addparamet": 5, "par": 5, "paramnam": 5, "mod": 5, "modnam": 5, "parameternam": 5, "namedmodul": 5, "loadpytorchdump": 5, "modelpath": 5, "debug": 5, "signatur": 5, "sequenti": 5, "md": 5, "overridenam": 5, "linear": 5, "weight": 5, "conv2d": 5, "kernelshap": 5, "channel": 5, "dropout": 5, "freq": 5, "5": 5, "chain": 5, "net": 5, "keytyp": 6, "tabl": 6, "size": [6, 8, 9, 12], "kei": 6, "insert": 6, "const": [4, 9], "here": [], "gpu": 11, "els": [], "_remotevarwrapp": [], "get": 7, "remoteresourc": [], "copi": [1, 7, 9], "access": [], "localaccess": [], "download": [], "unload": [], "zerotup": 8, "rect": 8, "offset": 8, "_dom": [4, 9], "strict": [], "nda": [], "_setarraydata": 9, "tensorfromctx": 9, "ctx": 9, "unsqueez": 9, "matvec": 9, "fromshap": 9, "100": 9, "diag": 9, "capitalt": 9, "loopgpusupport": 11, "debugprint": 11, "err": 11, "debugwrit": 11, "cartesian": 11, "y": 11, "tag": [11, 12], "iterkind": [11, 12], "standalon": [11, 12], "flatit": 11, "normalizearrai": 11, "unknown": 11, "isarraytyp": 11, "normalizedomain": 11, "domainfromshap": 11, "rangefrombound": 11, "high": [11, 12], "low": [11, 12], "rangefromstart": 11, "rangesfrombound": 11, "bound": [11, 13], "rangesfromshap": 11, "nbase": 11, "indexinshap": 11, "indexathelperprod": 11, "prod": 11, "indexathelpermultipl": 11, "div": 11, "indexat": [11, 12], "fasteach": 11, "argsort": 11, "tup": 11, "_tupl": 12, "imagetyp": 12, "ishomogeneoustupl": 12, "removeidx": 12, "untuplifi": 12, "insertidx": 12, "each": 12, "everi": 12, "everyzip": 12, "fastshap": 12, "myshap": 12, "normal": 12, "isrectangular": 12, "countoccurr": 12, "c": 12, "takeuntil": 12, "keepdel": 12, "stdrang": 13, "idxtyp": 13, "boundkind": 13, "both": 13, "stridekind": 13, "one": 13, "treeheight": 1, "datar": [], "tr": 7, "forget": [], "defaultdetachedmod": 2, "detach": [1, 2, 9], "detachmod": 2, "totyp": [2, 4, 9], "32": [4, 5, 13], "loadmodel": 5, "specfil": 5, "weightsfold": 5, "f32": 13, "f64": 13, "nil": 1, "dest": [1, 7], "keepgrad": [1, 9], "operationtyp": 1, "operationctx": 1, "bt": 1, "dont": [], "_remotevarcontain": 7, "containedvalu": 7, "ptr": 7, "_thunkrecord": 7, "copycontain": 7, "copyto": 7, "unmanag": 7, "chpl_locale_model": 11, "targetgpu": 11, "fastnormaldim": 12}, "objects": {"": [[1, 0, 0, "-", "Autograd"], [2, 0, 0, "-", "DynamicTensor"], [3, 0, 0, "-", "LoadNumpy"], [4, 0, 0, "-", "NDArray"], [5, 0, 0, "-", "Network"], [6, 0, 0, "-", "OrderedDict"], [7, 0, 0, "-", "Remote"], [8, 0, 0, "-", "SimpleDomain"], [12, 0, 0, "-", "Standard"], [9, 0, 0, "-", "StaticTensor"], [10, 0, 0, "-", "Tensor"], [13, 0, 0, "-", "Types"], [11, 0, 0, "-", "Utilities"]], "Autograd": [[1, 1, 1, "", "BaseTensorResource"], [1, 1, 1, "", "ForgetfulTensor"], [1, 1, 1, "", "TensorEssence"], [1, 1, 1, "", "TensorResource"], [1, 6, 1, "", "addOp"], [1, 6, 1, "", "baseValue"], [1, 7, 1, "", "checkRank"], [1, 6, 1, "", "conv2DOp"], [1, 6, 1, "", "divOp"], [1, 6, 1, "", "expOp"], [1, 6, 1, "", "expandOp"], [1, 7, 1, "", "forceRank"], [1, 7, 1, "", "getRank"], [1, 6, 1, "", "layerSliceOp"], [1, 6, 1, "", "maxOp"], [1, 6, 1, "", "multOp"], [1, 6, 1, "", "padOp"], [1, 6, 1, "", "permuteOp"], [1, 6, 1, "", "reluOp"], [1, 6, 1, "", "reshapeOp"], [1, 6, 1, "", "shrinkOp"], [1, 6, 1, "", "sliceOp"], [1, 6, 1, "", "subOp"], [1, 6, 1, "", "sumOp"]], "Autograd.BaseTensorResource": [[1, 2, 1, "", "array"], [1, 2, 1, "", "backward"], [1, 3, 1, "", "dataResource"], [1, 2, 1, "", "detach"], [1, 2, 1, "", "device"], [1, 2, 1, "", "forward"], [1, 2, 1, "", "grad"], [1, 3, 1, "", "gradResource"], [1, 2, 1, "", "init"], [1, 3, 1, "", "rank"], [1, 2, 1, "", "runtimeRank"], [1, 2, 1, "", "to"]], "Autograd.ForgetfulTensor": [[1, 3, 1, "", "rank"]], "Autograd.TensorEssence": [[1, 4, 1, "", "children"], [1, 5, 1, "", "eltType"], [1, 2, 1, "", "runtimeRank"], [1, 2, 1, "", "treeHeight"]], "Autograd.TensorResource": [[1, 4, 1, "", "children"], [1, 2, 1, "", "detach"], [1, 2, 1, "", "forward"], [1, 2, 1, "", "init"], [1, 3, 1, "", "operationCtx"], [1, 5, 1, "", "operationType"]], "Autograd.addOp": [[1, 2, 1, "", "backward"], [1, 2, 1, "", "children"], [1, 5, 1, "", "eltType"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "lhs"], [1, 3, 1, "", "rank"], [1, 3, 1, "", "rhs"]], "Autograd.baseValue": [[1, 2, 1, "", "children"], [1, 2, 1, "", "forward"]], "Autograd.conv2DOp": [[1, 2, 1, "", "backward"], [1, 2, 1, "", "children"], [1, 5, 1, "", "eltType"], [1, 3, 1, "", "features"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "kernel"], [1, 3, 1, "", "stride"]], "Autograd.divOp": [[1, 2, 1, "", "children"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "lhs"], [1, 3, 1, "", "rhs"]], "Autograd.expOp": [[1, 2, 1, "", "children"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "input"]], "Autograd.expandOp": [[1, 2, 1, "", "backward"], [1, 2, 1, "", "children"], [1, 5, 1, "", "eltType"], [1, 3, 1, "", "expandedShape"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "input"], [1, 3, 1, "", "rank"]], "Autograd.layerSliceOp": [[1, 2, 1, "", "backward"], [1, 3, 1, "", "base"], [1, 2, 1, "", "children"], [1, 5, 1, "", "eltType"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "mask"], [1, 3, 1, "", "maskDomain"], [1, 3, 1, "", "rank"]], "Autograd.maxOp": [[1, 3, 1, "", "axes"], [1, 2, 1, "", "backward"], [1, 2, 1, "", "children"], [1, 5, 1, "", "eltType"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "input"], [1, 3, 1, "", "maxRank"], [1, 3, 1, "", "rank"]], "Autograd.multOp": [[1, 2, 1, "", "backward"], [1, 2, 1, "", "children"], [1, 5, 1, "", "eltType"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "lhs"], [1, 3, 1, "", "rank"], [1, 3, 1, "", "rhs"]], "Autograd.padOp": [[1, 3, 1, "", "arg"], [1, 2, 1, "", "backward"], [1, 2, 1, "", "children"], [1, 5, 1, "", "eltType"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "input"], [1, 3, 1, "", "rank"], [1, 3, 1, "", "value"]], "Autograd.permuteOp": [[1, 2, 1, "", "backward"], [1, 2, 1, "", "children"], [1, 5, 1, "", "eltType"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "input"], [1, 3, 1, "", "permutation"], [1, 3, 1, "", "rank"]], "Autograd.reluOp": [[1, 2, 1, "", "_relu"], [1, 2, 1, "", "children"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "input"]], "Autograd.reshapeOp": [[1, 2, 1, "", "backward"], [1, 2, 1, "", "children"], [1, 5, 1, "", "eltType"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "input"], [1, 3, 1, "", "newRank"], [1, 3, 1, "", "oldRank"], [1, 3, 1, "", "shape"]], "Autograd.shrinkOp": [[1, 3, 1, "", "arg"], [1, 2, 1, "", "backward"], [1, 2, 1, "", "children"], [1, 5, 1, "", "eltType"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "input"], [1, 3, 1, "", "rank"]], "Autograd.sliceOp": [[1, 2, 1, "", "backward"], [1, 2, 1, "", "children"], [1, 3, 1, "", "dom"], [1, 5, 1, "", "eltType"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "input"], [1, 3, 1, "", "rank"]], "Autograd.subOp": [[1, 2, 1, "", "children"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "lhs"], [1, 3, 1, "", "rhs"]], "Autograd.sumOp": [[1, 3, 1, "", "axes"], [1, 2, 1, "", "backward"], [1, 2, 1, "", "children"], [1, 5, 1, "", "eltType"], [1, 2, 1, "", "forward"], [1, 3, 1, "", "input"], [1, 2, 1, "", "outRank"], [1, 3, 1, "", "rank"], [1, 3, 1, "", "sumRank"]], "DynamicTensor": [[2, 7, 1, "", "*"], [2, 7, 1, "", "+"], [2, 7, 1, "", "-"], [2, 7, 1, "", ":"], [2, 6, 1, "", "Tensor"], [2, 3, 1, "", "defaultDetachedMode"], [2, 7, 1, "", "main"], [2, 3, 1, "", "maxRank"], [2, 7, 1, "", "zipBinOp"]], "DynamicTensor.Tensor": [[2, 2, 1, "", "arange"], [2, 2, 1, "", "argmax"], [2, 2, 1, "", "array"], [2, 2, 1, "", "checkRank"], [2, 2, 1, "", "convolve"], [2, 2, 1, "", "data"], [2, 2, 1, "", "detach"], [2, 2, 1, "", "detachMode"], [2, 2, 1, "", "device"], [2, 5, 1, "", "eltType"], [2, 2, 1, "", "exp"], [2, 2, 1, "", "flatten"], [2, 2, 1, "", "forceRank"], [2, 2, 1, "", "forceRankMeta"], [2, 2, 1, "", "grad"], [2, 2, 1, "", "hardCheckRank"], [2, 2, 1, "", "init"], [2, 2, 1, "", "load"], [2, 2, 1, "", "loadFromNumpy"], [2, 2, 1, "", "matvecmul"], [2, 2, 1, "", "matvecmulFast"], [2, 2, 1, "", "max"], [2, 2, 1, "", "maxPool"], [2, 3, 1, "", "meta"], [2, 2, 1, "", "multiReader"], [2, 2, 1, "", "ones"], [2, 2, 1, "", "readInPlace"], [2, 2, 1, "", "relu"], [2, 2, 1, "", "reshape"], [2, 2, 1, "", "resource"], [2, 3, 1, "", "runtimeRank"], [2, 2, 1, "", "save"], [2, 2, 1, "", "serialize"], [2, 2, 1, "", "slice"], [2, 2, 1, "", "softmax"], [2, 2, 1, "", "sum"], [2, 2, 1, "", "tensorize"], [2, 2, 1, "", "this"], [2, 2, 1, "", "to"], [2, 2, 1, "", "toArray"], [2, 2, 1, "", "toNDArray"], [2, 2, 1, "", "write"], [2, 2, 1, "", "zeros"]], "DynamicTensor.ndarray": [[2, 2, 1, "", "toTensor"]], "DynamicTensor.tensor": [[2, 2, 1, "", "eraseRank"]], "LoadNumpy": [[3, 1, 1, "", "ArrClass"], [3, 1, 1, "", "NoRankArray"], [3, 7, 1, "", "loadNumpyArray"], [3, 7, 1, "", "main"], [3, 7, 1, "", "readData"], [3, 7, 1, "", "readShape"]], "LoadNumpy.ArrClass": [[3, 3, 1, "", "_domain"], [3, 3, 1, "", "data"], [3, 3, 1, "", "rank"]], "NDArray": [[4, 7, 1, "", "*"], [4, 7, 1, "", "+"], [4, 7, 1, "", "-"], [4, 7, 1, "", "/"], [4, 7, 1, "", ":"], [4, 7, 1, "", "="], [4, 1, 1, "", "_tensor_resource"], [4, 7, 1, "", "drop"], [4, 7, 1, "", "getFirstIdx"], [4, 7, 1, "", "main"], [4, 6, 1, "", "ndarray"], [4, 7, 1, "", "slice"], [4, 7, 1, "", "sliceGeneric"], [4, 7, 1, "", "splitAt"], [4, 7, 1, "", "take"], [4, 7, 1, "", "zipArr"]], "NDArray._tensor_resource": [[4, 3, 1, "", "data"], [4, 5, 1, "", "eltType"], [4, 3, 1, "", "rank"]], "NDArray.ndarray": [[4, 2, 1, "", "_dom"], [4, 3, 1, "", "_domain"], [4, 2, 1, "", "arange"], [4, 2, 1, "", "argmax"], [4, 4, 1, "", "batchify"], [4, 2, 1, "", "contract"], [4, 2, 1, "", "convolve"], [4, 3, 1, "", "data"], [4, 2, 1, "", "dilate"], [4, 2, 1, "", "einsum"], [4, 5, 1, "", "eltType"], [4, 2, 1, "", "expand"], [4, 2, 1, "", "fromRanges"], [4, 2, 1, "", "fullOuter"], [4, 2, 1, "", "init"], [4, 2, 1, "", "init="], [4, 2, 1, "", "kernelRot"], [4, 2, 1, "", "matvecmul"], [4, 2, 1, "", "max"], [4, 2, 1, "", "maxPool"], [4, 2, 1, "", "pad"], [4, 2, 1, "", "permute"], [4, 2, 1, "", "populateRemote"], [4, 3, 1, "", "rank"], [4, 2, 1, "", "read"], [4, 2, 1, "", "relu"], [4, 2, 1, "", "reshape"], [4, 2, 1, "", "reshapeDomain"], [4, 2, 1, "", "serialize"], [4, 2, 1, "", "setData"], [4, 2, 1, "", "shape"], [4, 2, 1, "", "shrink"], [4, 2, 1, "", "slice"], [4, 2, 1, "", "squeeze"], [4, 2, 1, "", "sum"], [4, 2, 1, "", "sumAxesMask"], [4, 2, 1, "", "sumOneAxis"], [4, 2, 1, "", "this"], [4, 2, 1, "", "toRemote"], [4, 2, 1, "", "write"]], "Network": [[5, 1, 1, "", "Conv2D"], [5, 1, 1, "", "Dropout"], [5, 1, 1, "", "Flatten"], [5, 1, 1, "", "Linear"], [5, 1, 1, "", "MaxPool"], [5, 1, 1, "", "Module"], [5, 1, 1, "", "ModuleSpecification"], [5, 1, 1, "", "Net"], [5, 1, 1, "", "Parameter"], [5, 1, 1, "", "ReLU"], [5, 1, 1, "", "Sequential"], [5, 1, 1, "", "Softmax"], [5, 2, 1, "", "attributes"], [5, 3, 1, "", "bias"], [5, 7, 1, "", "chain"], [5, 2, 1, "", "forward"], [5, 7, 1, "", "helpFindModuleByName"], [5, 7, 1, "", "helpFindParamDataByName"], [5, 2, 1, "", "init"], [5, 7, 1, "", "loadModel"], [5, 7, 1, "", "main"], [5, 7, 1, "", "modelFromSpecFile"], [5, 6, 1, "", "moduleAttributes"], [5, 6, 1, "", "moduleChildren"], [5, 7, 1, "", "moduleFromSpec"], [5, 3, 1, "", "moduleInstances"], [5, 3, 1, "", "n"], [5, 2, 1, "", "setup"], [5, 3, 1, "", "weight"]], "Network.Conv2D": [[5, 2, 1, "", "attributes"], [5, 3, 1, "", "bias"], [5, 2, 1, "", "forward"], [5, 2, 1, "", "init"], [5, 3, 1, "", "kernel"], [5, 3, 1, "", "kernelShape"], [5, 2, 1, "", "setup"], [5, 3, 1, "", "stride"]], "Network.Dropout": [[5, 2, 1, "", "attributes"], [5, 2, 1, "", "forward"], [5, 2, 1, "", "init"]], "Network.Flatten": [[5, 2, 1, "", "attributes"], [5, 2, 1, "", "forward"], [5, 2, 1, "", "init"]], "Network.Linear": [[5, 3, 1, "", "m"]], "Network.MaxPool": [[5, 2, 1, "", "attributes"], [5, 2, 1, "", "forward"], [5, 2, 1, "", "init"], [5, 3, 1, "", "poolSize"]], "Network.Module": [[5, 2, 1, "", "addModule"], [5, 2, 1, "", "addParameter"], [5, 2, 1, "", "attributes"], [5, 5, 1, "", "eltType"], [5, 2, 1, "", "forward"], [5, 2, 1, "", "getSubModuleName"], [5, 2, 1, "", "init"], [5, 2, 1, "", "loadPyTorchDump"], [5, 2, 1, "", "mod"], [5, 3, 1, "", "moduleId"], [5, 3, 1, "", "moduleName"], [5, 4, 1, "", "moduleNames"], [5, 4, 1, "", "modules"], [5, 4, 1, "", "namedModules"], [5, 3, 1, "", "ownedModules"], [5, 2, 1, "", "par"], [5, 4, 1, "", "parameterNames"], [5, 4, 1, "", "parameters"], [5, 2, 1, "", "setup"], [5, 2, 1, "", "signature"], [5, 3, 1, "", "subModules"], [5, 2, 1, "", "this"]], "Network.ModuleSpecification": [[5, 3, 1, "", "attributes"], [5, 3, 1, "", "layerType"], [5, 3, 1, "", "subModuleOrder"], [5, 3, 1, "", "subModules"]], "Network.Net": [[5, 2, 1, "", "forward"], [5, 2, 1, "", "init"]], "Network.Parameter": [[5, 2, 1, "", "attributes"], [5, 3, 1, "", "data"], [5, 2, 1, "", "init"]], "Network.ReLU": [[5, 2, 1, "", "attributes"], [5, 2, 1, "", "forward"], [5, 2, 1, "", "init"]], "Network.Sequential": [[5, 2, 1, "", "attributes"], [5, 2, 1, "", "forward"], [5, 2, 1, "", "init"], [5, 3, 1, "", "mds"]], "Network.Softmax": [[5, 2, 1, "", "attributes"], [5, 2, 1, "", "forward"], [5, 2, 1, "", "init"]], "Network.class": [[5, 4, 1, "", "moduleFieldNames"], [5, 4, 1, "", "moduleFields"], [5, 2, 1, "", "postinit"], [5, 2, 1, "", "registerModules"], [5, 2, 1, "", "this"]], "Network.moduleAttributes": [[5, 2, 1, "", ":"], [5, 3, 1, "", "attributes"], [5, 2, 1, "", "getInt"], [5, 2, 1, "", "init"], [5, 3, 1, "", "layerType"], [5, 3, 1, "", "moduleName"], [5, 2, 1, "", "prettyPrint"], [5, 2, 1, "", "prettyPrintSpec"]], "Network.moduleChildren": [[5, 2, 1, "", "add"], [5, 3, 1, "", "childDict"], [5, 5, 1, "", "eltType"], [5, 2, 1, "", "init"], [5, 4, 1, "", "items"], [5, 2, 1, "", "ith"], [5, 3, 1, "", "order"], [5, 4, 1, "", "these"]], "OrderedDict": [[6, 6, 1, "", "dict"]], "OrderedDict.dict": [[6, 2, 1, "", "init"], [6, 2, 1, "", "insert"], [6, 5, 1, "", "keyType"], [6, 4, 1, "", "keys"], [6, 3, 1, "", "order"], [6, 2, 1, "", "size"], [6, 3, 1, "", "table"], [6, 4, 1, "", "these"], [6, 5, 1, "", "valType"], [6, 4, 1, "", "values"]], "Remote": [[7, 1, 1, "", "Remote"], [7, 1, 1, "", "_RemoteVarContainer"], [7, 2, 1, "", "ref"]], "Remote.Remote": [[7, 2, 1, "", "copy"], [7, 2, 1, "", "copyContainer"], [7, 2, 1, "", "copyTo"], [7, 2, 1, "", "defaultDevice"], [7, 2, 1, "", "device"], [7, 5, 1, "", "eltType"], [7, 2, 1, "", "get"], [7, 2, 1, "", "init"], [7, 2, 1, "", "ptr"], [7, 2, 1, "", "to"], [7, 3, 1, "", "value"]], "Remote._RemoteVarContainer": [[7, 3, 1, "", "containedValue"]], "SimpleDomain": [[8, 6, 1, "", "rect"], [8, 7, 1, "", "zeroTup"]], "SimpleDomain.rect": [[8, 2, 1, "", "init"], [8, 3, 1, "", "offset"], [8, 3, 1, "", "rank"], [8, 3, 1, "", "shape"], [8, 2, 1, "", "size"]], "Standard._domain": [[12, 4, 1, "", "each"], [12, 4, 1, "", "every"], [12, 4, 1, "", "everyZip"], [12, 2, 1, "", "fastNormalDims"], [12, 2, 1, "", "fastShape"], [12, 2, 1, "", "indexAt"], [12, 2, 1, "", "isNormal"], [12, 2, 1, "", "myShape"], [12, 2, 1, "", "normalize"]], "Standard._tuple": [[12, 4, 1, "", "each"], [12, 2, 1, "", "eltType"], [12, 2, 1, "", "imageType"], [12, 2, 1, "", "indexAt"], [12, 2, 1, "", "insertIdx"], [12, 2, 1, "", "map"], [12, 2, 1, "", "removeIdx"], [12, 2, 1, "", "slice"], [12, 2, 1, "", "untuplify"]], "Standard.string": [[12, 2, 1, "", "countOccurrences"], [12, 2, 1, "", "drop"], [12, 2, 1, "", "slice"], [12, 2, 1, "", "take"], [12, 2, 1, "", "takeUntil"], [12, 2, 1, "", "this"]], "StaticTensor": [[9, 7, 1, "", "*"], [9, 7, 1, "", "+"], [9, 7, 1, "", "-"], [9, 7, 1, "", "/"], [9, 7, 1, "", ":"], [9, 3, 1, "", "diag"], [9, 7, 1, "", "main"], [9, 7, 1, "", "matvec"], [9, 3, 1, "", "n"], [9, 3, 1, "", "size"], [9, 6, 1, "", "tensor"], [9, 7, 1, "", "tensorFromCtx"]], "StaticTensor.tensor": [[9, 2, 1, "", "_dom"], [9, 2, 1, "", "_setArrayData"], [9, 2, 1, "", "arange"], [9, 2, 1, "", "convolve"], [9, 2, 1, "", "detach"], [9, 2, 1, "", "dilate"], [9, 5, 1, "", "eltType"], [9, 2, 1, "", "exp"], [9, 2, 1, "", "expand"], [9, 2, 1, "", "fromShape"], [9, 2, 1, "", "init"], [9, 2, 1, "", "matvecmul"], [9, 2, 1, "", "matvecmulFast"], [9, 2, 1, "", "max"], [9, 2, 1, "", "maxPool"], [9, 2, 1, "", "meta"], [9, 2, 1, "", "ones"], [9, 2, 1, "", "pad"], [9, 2, 1, "", "permute"], [9, 3, 1, "", "rank"], [9, 2, 1, "", "read"], [9, 2, 1, "", "relu"], [9, 2, 1, "", "reshape"], [9, 2, 1, "", "reshapeDomain"], [9, 3, 1, "", "resource"], [9, 2, 1, "", "serialize"], [9, 2, 1, "", "shrink"], [9, 2, 1, "", "slice"], [9, 2, 1, "", "softmax"], [9, 2, 1, "", "sum"], [9, 2, 1, "", "this"], [9, 2, 1, "", "unsqueeze"], [9, 2, 1, "", "zeros"]], "Types": [[13, 5, 1, "", "f32"], [13, 5, 1, "", "f64"], [13, 5, 1, "", "stdRange"]], "Utilities": [[11, 7, 1, "", "argsort"], [11, 8, 1, "", "cartesian"], [11, 3, 1, "", "debugPrint"], [11, 7, 1, "", "debugWrite"], [11, 7, 1, "", "domainFromShape"], [11, 7, 1, "", "emptyDomain"], [11, 7, 1, "", "err"], [11, 8, 1, "", "fastEach"], [11, 8, 1, "", "flatIter"], [11, 7, 1, "", "indexAt"], [11, 7, 1, "", "indexAtHelperMultiples"], [11, 7, 1, "", "indexAtHelperProd"], [11, 7, 1, "", "indexInShape"], [11, 3, 1, "", "loopGpuSupport"], [11, 7, 1, "", "nbase"], [11, 7, 1, "", "normalizeArray"], [11, 7, 1, "", "normalizeDomain"], [11, 7, 1, "", "rangeFromBound"], [11, 7, 1, "", "rangeFromStart"], [11, 7, 1, "", "rangesFromBounds"], [11, 7, 1, "", "rangesFromShape"], [11, 7, 1, "", "targetGpu"]]}, "objtypes": {"0": "chpl:module", "1": "chpl:class", "2": "chpl:method", "3": "chpl:data", "4": "chpl:itermethod", "5": "chpl:type", "6": "chpl:record", "7": "chpl:function", "8": "chpl:iterfunction"}, "objnames": {"0": ["chpl", "module", " module"], "1": ["chpl", "class", " class"], "2": ["chpl", "method", " method"], "3": ["chpl", "data", " data"], "4": ["chpl", "itermethod", " itermethod"], "5": ["chpl", "type", " type"], "6": ["chpl", "record", " record"], "7": ["chpl", "function", " function"], "8": ["chpl", "iterfunction", " iterfunction"]}, "titleterms": {"chpldoc": 0, "document": 0, "indic": 0, "tabl": 0, "autograd": 1, "dynamictensor": 2, "loadnumpi": 3, "ndarrai": 4, "network": 5, "ordereddict": 6, "remot": 7, "simpledomain": 8, "statictensor": 9, "tensor": 10, "util": 11, "standard": 12, "type": 13}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.todo": 2, "sphinx": 60}, "alltitles": {"chpldoc documentation": [[0, "chpldoc-documentation"]], "Indices and tables": [[0, "indices-and-tables"]], "Autograd": [[1, "autograd"]], "DynamicTensor": [[2, "dynamictensor"]], "LoadNumpy": [[3, "loadnumpy"]], "NDArray": [[4, "ndarray"]], "Network": [[5, "network"]], "OrderedDict": [[6, "ordereddict"]], "Remote": [[7, "remote"]], "SimpleDomain": [[8, "simpledomain"]], "StaticTensor": [[9, "statictensor"]], "Tensor": [[10, "tensor"]], "Utilities": [[11, "utilities"]], "Standard": [[12, "standard"]], "Types": [[13, "types"]]}, "indexentries": {"autograd (module)": [[1, "module-Autograd"]], "basetensorresource (class in autograd)": [[1, "Autograd.BaseTensorResource"]], "basetensorresource.dataresource (in module autograd)": [[1, "Autograd.BaseTensorResource.dataResource"]], "basetensorresource.gradresource (in module autograd)": [[1, "Autograd.BaseTensorResource.gradResource"]], "basetensorresource.rank (in module autograd)": [[1, "Autograd.BaseTensorResource.rank"]], "forgetfultensor (class in autograd)": [[1, "Autograd.ForgetfulTensor"]], "forgetfultensor.rank (in module autograd)": [[1, "Autograd.ForgetfulTensor.rank"]], "tensoressence (class in autograd)": [[1, "Autograd.TensorEssence"]], "tensoressence.elttype (in module autograd)": [[1, "Autograd.TensorEssence.eltType"]], "tensorresource (class in autograd)": [[1, "Autograd.TensorResource"]], "tensorresource.operationctx (in module autograd)": [[1, "Autograd.TensorResource.operationCtx"]], "tensorresource.operationtype (in module autograd)": [[1, "Autograd.TensorResource.operationType"]], "_relu() (autograd.reluop method)": [[1, "Autograd.reluOp._relu"]], "addop (record in autograd)": [[1, "Autograd.addOp"]], "addop.elttype (in module autograd)": [[1, "Autograd.addOp.eltType"]], "addop.lhs (in module autograd)": [[1, "Autograd.addOp.lhs"]], "addop.rank (in module autograd)": [[1, "Autograd.addOp.rank"]], "addop.rhs (in module autograd)": [[1, "Autograd.addOp.rhs"]], "array() (autograd.basetensorresource method)": [[1, "Autograd.BaseTensorResource.array"]], "backward() (autograd.basetensorresource method)": [[1, "Autograd.BaseTensorResource.backward"]], "backward() (autograd.addop method)": [[1, "Autograd.addOp.backward"]], "backward() (autograd.conv2dop method)": [[1, "Autograd.conv2DOp.backward"]], "backward() (autograd.expandop method)": [[1, "Autograd.expandOp.backward"]], "backward() (autograd.layersliceop method)": [[1, "Autograd.layerSliceOp.backward"]], "backward() (autograd.maxop method)": [[1, "Autograd.maxOp.backward"]], "backward() (autograd.multop method)": [[1, "Autograd.multOp.backward"]], "backward() (autograd.padop method)": [[1, "Autograd.padOp.backward"]], "backward() (autograd.permuteop method)": [[1, "Autograd.permuteOp.backward"]], "backward() (autograd.reshapeop method)": [[1, "Autograd.reshapeOp.backward"]], "backward() (autograd.shrinkop method)": [[1, "Autograd.shrinkOp.backward"]], "backward() (autograd.sliceop method)": [[1, "Autograd.sliceOp.backward"]], "backward() (autograd.sumop method)": [[1, "Autograd.sumOp.backward"]], "basevalue (record in autograd)": [[1, "Autograd.baseValue"]], "checkrank() (in module autograd)": [[1, "Autograd.checkRank"]], "children() (autograd.tensoressence iterator)": [[1, "Autograd.TensorEssence.children"]], "children() (autograd.tensorresource iterator)": [[1, "Autograd.TensorResource.children"]], "children() (autograd.addop method)": [[1, "Autograd.addOp.children"]], "children() (autograd.basevalue method)": [[1, "Autograd.baseValue.children"]], "children() (autograd.conv2dop method)": [[1, "Autograd.conv2DOp.children"]], "children() (autograd.divop method)": [[1, "Autograd.divOp.children"]], "children() (autograd.expop method)": [[1, "Autograd.expOp.children"]], "children() (autograd.expandop method)": [[1, "Autograd.expandOp.children"]], "children() (autograd.layersliceop method)": [[1, "Autograd.layerSliceOp.children"]], "children() (autograd.maxop method)": [[1, "Autograd.maxOp.children"]], "children() (autograd.multop method)": [[1, "Autograd.multOp.children"]], "children() (autograd.padop method)": [[1, "Autograd.padOp.children"]], "children() (autograd.permuteop method)": [[1, "Autograd.permuteOp.children"]], "children() (autograd.reluop method)": [[1, "Autograd.reluOp.children"]], "children() (autograd.reshapeop method)": [[1, "Autograd.reshapeOp.children"]], "children() (autograd.shrinkop method)": [[1, "Autograd.shrinkOp.children"]], "children() (autograd.sliceop method)": [[1, "Autograd.sliceOp.children"]], "children() (autograd.subop method)": [[1, "Autograd.subOp.children"]], "children() (autograd.sumop method)": [[1, "Autograd.sumOp.children"]], "conv2dop (record in autograd)": [[1, "Autograd.conv2DOp"]], "conv2dop.elttype (in module autograd)": [[1, "Autograd.conv2DOp.eltType"]], "conv2dop.features (in module autograd)": [[1, "Autograd.conv2DOp.features"]], "conv2dop.kernel (in module autograd)": [[1, "Autograd.conv2DOp.kernel"]], "conv2dop.stride (in module autograd)": [[1, "Autograd.conv2DOp.stride"]], "detach() (autograd.basetensorresource method)": [[1, "Autograd.BaseTensorResource.detach"]], "detach() (autograd.tensorresource method)": [[1, "Autograd.TensorResource.detach"]], "device() (autograd.basetensorresource method)": [[1, "Autograd.BaseTensorResource.device"]], "divop (record in autograd)": [[1, "Autograd.divOp"]], "divop.lhs (in module autograd)": [[1, "Autograd.divOp.lhs"]], "divop.rhs (in module autograd)": [[1, "Autograd.divOp.rhs"]], "expop (record in autograd)": [[1, "Autograd.expOp"]], "expop.input (in module autograd)": [[1, "Autograd.expOp.input"]], "expandop (record in autograd)": [[1, "Autograd.expandOp"]], "expandop.elttype (in module autograd)": [[1, "Autograd.expandOp.eltType"]], "expandop.expandedshape (in module autograd)": [[1, "Autograd.expandOp.expandedShape"]], "expandop.input (in module autograd)": [[1, "Autograd.expandOp.input"]], "expandop.rank (in module autograd)": [[1, "Autograd.expandOp.rank"]], "forcerank() (in module autograd)": [[1, "Autograd.forceRank"]], "forward() (autograd.basetensorresource method)": [[1, "Autograd.BaseTensorResource.forward"]], "forward() (autograd.tensorresource method)": [[1, "Autograd.TensorResource.forward"]], "forward() (autograd.addop method)": [[1, "Autograd.addOp.forward"]], "forward() (autograd.basevalue method)": [[1, "Autograd.baseValue.forward"]], "forward() (autograd.conv2dop method)": [[1, "Autograd.conv2DOp.forward"]], "forward() (autograd.divop method)": [[1, "Autograd.divOp.forward"]], "forward() (autograd.expop method)": [[1, "Autograd.expOp.forward"]], "forward() (autograd.expandop method)": [[1, "Autograd.expandOp.forward"]], "forward() (autograd.layersliceop method)": [[1, "Autograd.layerSliceOp.forward"]], "forward() (autograd.maxop method)": [[1, "Autograd.maxOp.forward"]], "forward() (autograd.multop method)": [[1, "Autograd.multOp.forward"]], "forward() (autograd.padop method)": [[1, "Autograd.padOp.forward"]], "forward() (autograd.permuteop method)": [[1, "Autograd.permuteOp.forward"]], "forward() (autograd.reluop method)": [[1, "Autograd.reluOp.forward"]], "forward() (autograd.reshapeop method)": [[1, "Autograd.reshapeOp.forward"]], "forward() (autograd.shrinkop method)": [[1, "Autograd.shrinkOp.forward"]], "forward() (autograd.sliceop method)": [[1, "Autograd.sliceOp.forward"]], "forward() (autograd.subop method)": [[1, "Autograd.subOp.forward"]], "forward() (autograd.sumop method)": [[1, "Autograd.sumOp.forward"]], "getrank() (in module autograd)": [[1, "Autograd.getRank"]], "grad() (autograd.basetensorresource method)": [[1, "Autograd.BaseTensorResource.grad"]], "init() (autograd.basetensorresource method)": [[1, "Autograd.BaseTensorResource.init"]], "init() (autograd.tensorresource method)": [[1, "Autograd.TensorResource.init"]], "layersliceop (record in autograd)": [[1, "Autograd.layerSliceOp"]], "layersliceop.base (in module autograd)": [[1, "Autograd.layerSliceOp.base"]], "layersliceop.elttype (in module autograd)": [[1, "Autograd.layerSliceOp.eltType"]], "layersliceop.mask (in module autograd)": [[1, "Autograd.layerSliceOp.mask"]], "layersliceop.maskdomain (in module autograd)": [[1, "Autograd.layerSliceOp.maskDomain"]], "layersliceop.rank (in module autograd)": [[1, "Autograd.layerSliceOp.rank"]], "maxop (record in autograd)": [[1, "Autograd.maxOp"]], "maxop.axes (in module autograd)": [[1, "Autograd.maxOp.axes"]], "maxop.elttype (in module autograd)": [[1, "Autograd.maxOp.eltType"]], "maxop.input (in module autograd)": [[1, "Autograd.maxOp.input"]], "maxop.maxrank (in module autograd)": [[1, "Autograd.maxOp.maxRank"]], "maxop.rank (in module autograd)": [[1, "Autograd.maxOp.rank"]], "multop (record in autograd)": [[1, "Autograd.multOp"]], "multop.elttype (in module autograd)": [[1, "Autograd.multOp.eltType"]], "multop.lhs (in module autograd)": [[1, "Autograd.multOp.lhs"]], "multop.rank (in module autograd)": [[1, "Autograd.multOp.rank"]], "multop.rhs (in module autograd)": [[1, "Autograd.multOp.rhs"]], "outrank() (autograd.sumop method)": [[1, "Autograd.sumOp.outRank"]], "padop (record in autograd)": [[1, "Autograd.padOp"]], "padop.arg (in module autograd)": [[1, "Autograd.padOp.arg"]], "padop.elttype (in module autograd)": [[1, "Autograd.padOp.eltType"]], "padop.input (in module autograd)": [[1, "Autograd.padOp.input"]], "padop.rank (in module autograd)": [[1, "Autograd.padOp.rank"]], "padop.value (in module autograd)": [[1, "Autograd.padOp.value"]], "permuteop (record in autograd)": [[1, "Autograd.permuteOp"]], "permuteop.elttype (in module autograd)": [[1, "Autograd.permuteOp.eltType"]], "permuteop.input (in module autograd)": [[1, "Autograd.permuteOp.input"]], "permuteop.permutation (in module autograd)": [[1, "Autograd.permuteOp.permutation"]], "permuteop.rank (in module autograd)": [[1, "Autograd.permuteOp.rank"]], "reluop (record in autograd)": [[1, "Autograd.reluOp"]], "reluop.input (in module autograd)": [[1, "Autograd.reluOp.input"]], "reshapeop (record in autograd)": [[1, "Autograd.reshapeOp"]], "reshapeop.elttype (in module autograd)": [[1, "Autograd.reshapeOp.eltType"]], "reshapeop.input (in module autograd)": [[1, "Autograd.reshapeOp.input"]], "reshapeop.newrank (in module autograd)": [[1, "Autograd.reshapeOp.newRank"]], "reshapeop.oldrank (in module autograd)": [[1, "Autograd.reshapeOp.oldRank"]], "reshapeop.shape (in module autograd)": [[1, "Autograd.reshapeOp.shape"]], "runtimerank() (autograd.basetensorresource method)": [[1, "Autograd.BaseTensorResource.runtimeRank"]], "runtimerank() (autograd.tensoressence method)": [[1, "Autograd.TensorEssence.runtimeRank"]], "shrinkop (record in autograd)": [[1, "Autograd.shrinkOp"]], "shrinkop.arg (in module autograd)": [[1, "Autograd.shrinkOp.arg"]], "shrinkop.elttype (in module autograd)": [[1, "Autograd.shrinkOp.eltType"]], "shrinkop.input (in module autograd)": [[1, "Autograd.shrinkOp.input"]], "shrinkop.rank (in module autograd)": [[1, "Autograd.shrinkOp.rank"]], "sliceop (record in autograd)": [[1, "Autograd.sliceOp"]], "sliceop.dom (in module autograd)": [[1, "Autograd.sliceOp.dom"]], "sliceop.elttype (in module autograd)": [[1, "Autograd.sliceOp.eltType"]], "sliceop.input (in module autograd)": [[1, "Autograd.sliceOp.input"]], "sliceop.rank (in module autograd)": [[1, "Autograd.sliceOp.rank"]], "subop (record in autograd)": [[1, "Autograd.subOp"]], "subop.lhs (in module autograd)": [[1, "Autograd.subOp.lhs"]], "subop.rhs (in module autograd)": [[1, "Autograd.subOp.rhs"]], "sumop (record in autograd)": [[1, "Autograd.sumOp"]], "sumop.axes (in module autograd)": [[1, "Autograd.sumOp.axes"]], "sumop.elttype (in module autograd)": [[1, "Autograd.sumOp.eltType"]], "sumop.input (in module autograd)": [[1, "Autograd.sumOp.input"]], "sumop.rank (in module autograd)": [[1, "Autograd.sumOp.rank"]], "sumop.sumrank (in module autograd)": [[1, "Autograd.sumOp.sumRank"]], "to() (autograd.basetensorresource method)": [[1, "Autograd.BaseTensorResource.to"]], "treeheight() (autograd.tensoressence method)": [[1, "Autograd.TensorEssence.treeHeight"]], "*() (in module dynamictensor)": [[2, "DynamicTensor.*"]], "+() (in module dynamictensor)": [[2, "DynamicTensor.+"]], "-() (in module dynamictensor)": [[2, "DynamicTensor.-"]], ":() (in module dynamictensor)": [[2, "DynamicTensor.:"]], "dynamictensor (module)": [[2, "module-DynamicTensor"]], "tensor (record in dynamictensor)": [[2, "DynamicTensor.Tensor"]], "tensor.elttype (in module dynamictensor)": [[2, "DynamicTensor.Tensor.eltType"]], "tensor.meta (in module dynamictensor)": [[2, "DynamicTensor.Tensor.meta"]], "tensor.runtimerank (in module dynamictensor)": [[2, "DynamicTensor.Tensor.runtimeRank"]], "arange() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.arange"]], "argmax() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.argmax"]], "array() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.array"]], "checkrank() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.checkRank"]], "convolve() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.convolve"]], "data() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.data"]], "defaultdetachedmode (in module dynamictensor)": [[2, "DynamicTensor.defaultDetachedMode"]], "detach() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.detach"]], "detachmode() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.detachMode"]], "device() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.device"]], "eraserank() (dynamictensor.tensor method)": [[2, "DynamicTensor.tensor.eraseRank"]], "exp() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.exp"]], "flatten() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.flatten"]], "forcerank() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.forceRank"]], "forcerankmeta() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.forceRankMeta"]], "grad() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.grad"]], "hardcheckrank() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.hardCheckRank"]], "init() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.init"]], "load() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.load"]], "loadfromnumpy() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.loadFromNumpy"]], "main() (in module dynamictensor)": [[2, "DynamicTensor.main"]], "matvecmul() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.matvecmul"]], "matvecmulfast() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.matvecmulFast"]], "max() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.max"]], "maxpool() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.maxPool"]], "maxrank (in module dynamictensor)": [[2, "DynamicTensor.maxRank"]], "multireader() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.multiReader"]], "ones() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.ones"]], "readinplace() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.readInPlace"]], "relu() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.relu"]], "reshape() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.reshape"]], "resource() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.resource"]], "save() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.save"]], "serialize() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.serialize"]], "slice() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.slice"]], "softmax() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.softmax"]], "sum() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.sum"]], "tensorize() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.tensorize"]], "this() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.this"]], "to() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.to"]], "toarray() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.toArray"]], "tondarray() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.toNDArray"]], "totensor() (dynamictensor.ndarray method)": [[2, "DynamicTensor.ndarray.toTensor"]], "write() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.write"]], "zeros() (dynamictensor.tensor method)": [[2, "DynamicTensor.Tensor.zeros"]], "zipbinop() (in module dynamictensor)": [[2, "DynamicTensor.zipBinOp"]], "arrclass (class in loadnumpy)": [[3, "LoadNumpy.ArrClass"]], "arrclass._domain (in module loadnumpy)": [[3, "LoadNumpy.ArrClass._domain"]], "arrclass.data (in module loadnumpy)": [[3, "LoadNumpy.ArrClass.data"]], "arrclass.rank (in module loadnumpy)": [[3, "LoadNumpy.ArrClass.rank"]], "loadnumpy (module)": [[3, "module-LoadNumpy"]], "norankarray (class in loadnumpy)": [[3, "LoadNumpy.NoRankArray"]], "loadnumpyarray() (in module loadnumpy)": [[3, "LoadNumpy.loadNumpyArray"]], "main() (in module loadnumpy)": [[3, "LoadNumpy.main"]], "readdata() (in module loadnumpy)": [[3, "LoadNumpy.readData"]], "readshape() (in module loadnumpy)": [[3, "LoadNumpy.readShape"]], "*() (in module ndarray)": [[4, "NDArray.*"]], "+() (in module ndarray)": [[4, "NDArray.+"]], "-() (in module ndarray)": [[4, "NDArray.-"]], "/() (in module ndarray)": [[4, "NDArray./"]], ":() (in module ndarray)": [[4, "NDArray.:"]], "=() (in module ndarray)": [[4, "NDArray.="]], "ndarray (module)": [[4, "module-NDArray"]], "_dom() (ndarray.ndarray method)": [[4, "NDArray.ndarray._dom"]], "_tensor_resource (class in ndarray)": [[4, "NDArray._tensor_resource"]], "_tensor_resource.data (in module ndarray)": [[4, "NDArray._tensor_resource.data"]], "_tensor_resource.elttype (in module ndarray)": [[4, "NDArray._tensor_resource.eltType"]], "_tensor_resource.rank (in module ndarray)": [[4, "NDArray._tensor_resource.rank"]], "arange() (ndarray.ndarray method)": [[4, "NDArray.ndarray.arange"]], "argmax() (ndarray.ndarray method)": [[4, "NDArray.ndarray.argmax"]], "batchify() (ndarray.ndarray iterator)": [[4, "NDArray.ndarray.batchify"]], "contract() (ndarray.ndarray method)": [[4, "NDArray.ndarray.contract"]], "convolve() (ndarray.ndarray method)": [[4, "NDArray.ndarray.convolve"]], "dilate() (ndarray.ndarray method)": [[4, "NDArray.ndarray.dilate"]], "drop() (in module ndarray)": [[4, "NDArray.drop"]], "einsum() (ndarray.ndarray method)": [[4, "NDArray.ndarray.einsum"]], "expand() (ndarray.ndarray method)": [[4, "NDArray.ndarray.expand"]], "fromranges() (ndarray.ndarray method)": [[4, "NDArray.ndarray.fromRanges"]], "fullouter() (ndarray.ndarray method)": [[4, "NDArray.ndarray.fullOuter"]], "getfirstidx() (in module ndarray)": [[4, "NDArray.getFirstIdx"]], "init() (ndarray.ndarray method)": [[4, "NDArray.ndarray.init"]], "init=() (ndarray.ndarray method)": [[4, "NDArray.ndarray.init="]], "kernelrot() (ndarray.ndarray method)": [[4, "NDArray.ndarray.kernelRot"]], "main() (in module ndarray)": [[4, "NDArray.main"]], "matvecmul() (ndarray.ndarray method)": [[4, "NDArray.ndarray.matvecmul"]], "max() (ndarray.ndarray method)": [[4, "NDArray.ndarray.max"]], "maxpool() (ndarray.ndarray method)": [[4, "NDArray.ndarray.maxPool"]], "ndarray (record in ndarray)": [[4, "NDArray.ndarray"]], "ndarray._domain (in module ndarray)": [[4, "NDArray.ndarray._domain"]], "ndarray.data (in module ndarray)": [[4, "NDArray.ndarray.data"]], "ndarray.elttype (in module ndarray)": [[4, "NDArray.ndarray.eltType"]], "ndarray.rank (in module ndarray)": [[4, "NDArray.ndarray.rank"]], "pad() (ndarray.ndarray method)": [[4, "NDArray.ndarray.pad"]], "permute() (ndarray.ndarray method)": [[4, "NDArray.ndarray.permute"]], "populateremote() (ndarray.ndarray method)": [[4, "NDArray.ndarray.populateRemote"]], "read() (ndarray.ndarray method)": [[4, "NDArray.ndarray.read"]], "relu() (ndarray.ndarray method)": [[4, "NDArray.ndarray.relu"]], "reshape() (ndarray.ndarray method)": [[4, "NDArray.ndarray.reshape"]], "reshapedomain() (ndarray.ndarray method)": [[4, "NDArray.ndarray.reshapeDomain"]], "serialize() (ndarray.ndarray method)": [[4, "NDArray.ndarray.serialize"]], "setdata() (ndarray.ndarray method)": [[4, "NDArray.ndarray.setData"]], "shape() (ndarray.ndarray method)": [[4, "NDArray.ndarray.shape"]], "shrink() (ndarray.ndarray method)": [[4, "NDArray.ndarray.shrink"]], "slice() (ndarray.ndarray method)": [[4, "NDArray.ndarray.slice"]], "slice() (in module ndarray)": [[4, "NDArray.slice"]], "slicegeneric() (in module ndarray)": [[4, "NDArray.sliceGeneric"]], "splitat() (in module ndarray)": [[4, "NDArray.splitAt"]], "squeeze() (ndarray.ndarray method)": [[4, "NDArray.ndarray.squeeze"]], "sum() (ndarray.ndarray method)": [[4, "NDArray.ndarray.sum"]], "sumaxesmask() (ndarray.ndarray method)": [[4, "NDArray.ndarray.sumAxesMask"]], "sumoneaxis() (ndarray.ndarray method)": [[4, "NDArray.ndarray.sumOneAxis"]], "take() (in module ndarray)": [[4, "NDArray.take"]], "this() (ndarray.ndarray method)": [[4, "NDArray.ndarray.this"]], "toremote() (ndarray.ndarray method)": [[4, "NDArray.ndarray.toRemote"]], "write() (ndarray.ndarray method)": [[4, "NDArray.ndarray.write"]], "ziparr() (in module ndarray)": [[4, "NDArray.zipArr"]], ":() (network.moduleattributes method)": [[5, "Network.moduleAttributes.:"]], "conv2d (class in network)": [[5, "Network.Conv2D"]], "conv2d.bias (in module network)": [[5, "Network.Conv2D.bias"]], "conv2d.kernel (in module network)": [[5, "Network.Conv2D.kernel"]], "conv2d.kernelshape (in module network)": [[5, "Network.Conv2D.kernelShape"]], "conv2d.stride (in module network)": [[5, "Network.Conv2D.stride"]], "dropout (class in network)": [[5, "Network.Dropout"]], "flatten (class in network)": [[5, "Network.Flatten"]], "linear (class in network)": [[5, "Network.Linear"]], "linear.m (in module network)": [[5, "Network.Linear.m"]], "maxpool (class in network)": [[5, "Network.MaxPool"]], "maxpool.poolsize (in module network)": [[5, "Network.MaxPool.poolSize"]], "module (class in network)": [[5, "Network.Module"]], "module.elttype (in module network)": [[5, "Network.Module.eltType"]], "module.moduleid (in module network)": [[5, "Network.Module.moduleId"]], "module.modulename (in module network)": [[5, "Network.Module.moduleName"]], "module.ownedmodules (in module network)": [[5, "Network.Module.ownedModules"]], "module.submodules (in module network)": [[5, "Network.Module.subModules"]], "modulespecification (class in network)": [[5, "Network.ModuleSpecification"]], "modulespecification.attributes (in module network)": [[5, "Network.ModuleSpecification.attributes"]], "modulespecification.layertype (in module network)": [[5, "Network.ModuleSpecification.layerType"]], "modulespecification.submoduleorder (in module network)": [[5, "Network.ModuleSpecification.subModuleOrder"]], "modulespecification.submodules (in module network)": [[5, "Network.ModuleSpecification.subModules"]], "net (class in network)": [[5, "Network.Net"]], "network (module)": [[5, "module-Network"]], "parameter (class in network)": [[5, "Network.Parameter"]], "parameter.data (in module network)": [[5, "Network.Parameter.data"]], "relu (class in network)": [[5, "Network.ReLU"]], "sequential (class in network)": [[5, "Network.Sequential"]], "sequential.mds (in module network)": [[5, "Network.Sequential.mds"]], "softmax (class in network)": [[5, "Network.Softmax"]], "add() (network.modulechildren method)": [[5, "Network.moduleChildren.add"]], "addmodule() (network.module method)": [[5, "Network.Module.addModule"]], "addparameter() (network.module method)": [[5, "Network.Module.addParameter"]], "attributes() (network.conv2d method)": [[5, "Network.Conv2D.attributes"]], "attributes() (network.dropout method)": [[5, "Network.Dropout.attributes"]], "attributes() (network.flatten method)": [[5, "Network.Flatten.attributes"]], "attributes() (network.maxpool method)": [[5, "Network.MaxPool.attributes"]], "attributes() (network.module method)": [[5, "Network.Module.attributes"]], "attributes() (network.parameter method)": [[5, "Network.Parameter.attributes"]], "attributes() (network.relu method)": [[5, "Network.ReLU.attributes"]], "attributes() (network.sequential method)": [[5, "Network.Sequential.attributes"]], "attributes() (network.softmax method)": [[5, "Network.Softmax.attributes"]], "attributes() (in module network)": [[5, "Network.attributes"]], "bias (in module network)": [[5, "Network.bias"]], "chain() (in module network)": [[5, "Network.chain"]], "forward() (network.conv2d method)": [[5, "Network.Conv2D.forward"]], "forward() (network.dropout method)": [[5, "Network.Dropout.forward"]], "forward() (network.flatten method)": [[5, "Network.Flatten.forward"]], "forward() (network.maxpool method)": [[5, "Network.MaxPool.forward"]], "forward() (network.module method)": [[5, "Network.Module.forward"]], "forward() (network.net method)": [[5, "Network.Net.forward"]], "forward() (network.relu method)": [[5, "Network.ReLU.forward"]], "forward() (network.sequential method)": [[5, "Network.Sequential.forward"]], "forward() (network.softmax method)": [[5, "Network.Softmax.forward"]], "forward() (in module network)": [[5, "Network.forward"]], "getint() (network.moduleattributes method)": [[5, "Network.moduleAttributes.getInt"]], "getsubmodulename() (network.module method)": [[5, "Network.Module.getSubModuleName"]], "helpfindmodulebyname() (in module network)": [[5, "Network.helpFindModuleByName"]], "helpfindparamdatabyname() (in module network)": [[5, "Network.helpFindParamDataByName"]], "init() (network.conv2d method)": [[5, "Network.Conv2D.init"]], "init() (network.dropout method)": [[5, "Network.Dropout.init"]], "init() (network.flatten method)": [[5, "Network.Flatten.init"]], "init() (network.maxpool method)": [[5, "Network.MaxPool.init"]], "init() (network.module method)": [[5, "Network.Module.init"]], "init() (network.net method)": [[5, "Network.Net.init"]], "init() (network.parameter method)": [[5, "Network.Parameter.init"]], "init() (network.relu method)": [[5, "Network.ReLU.init"]], "init() (network.sequential method)": [[5, "Network.Sequential.init"]], "init() (network.softmax method)": [[5, "Network.Softmax.init"]], "init() (network.moduleattributes method)": [[5, "Network.moduleAttributes.init"]], "init() (network.modulechildren method)": [[5, "Network.moduleChildren.init"]], "init() (in module network)": [[5, "Network.init"]], "items() (network.modulechildren iterator)": [[5, "Network.moduleChildren.items"]], "ith() (network.modulechildren method)": [[5, "Network.moduleChildren.ith"]], "loadmodel() (in module network)": [[5, "Network.loadModel"]], "loadpytorchdump() (network.module method)": [[5, "Network.Module.loadPyTorchDump"]], "main() (in module network)": [[5, "Network.main"]], "mod() (network.module method)": [[5, "Network.Module.mod"]], "modelfromspecfile() (in module network)": [[5, "Network.modelFromSpecFile"]], "moduleattributes (record in network)": [[5, "Network.moduleAttributes"]], "moduleattributes.attributes (in module network)": [[5, "Network.moduleAttributes.attributes"]], "moduleattributes.layertype (in module network)": [[5, "Network.moduleAttributes.layerType"]], "moduleattributes.modulename (in module network)": [[5, "Network.moduleAttributes.moduleName"]], "modulechildren (record in network)": [[5, "Network.moduleChildren"]], "modulechildren.childdict (in module network)": [[5, "Network.moduleChildren.childDict"]], "modulechildren.elttype (in module network)": [[5, "Network.moduleChildren.eltType"]], "modulechildren.order (in module network)": [[5, "Network.moduleChildren.order"]], "modulefieldnames() (network.class iterator)": [[5, "Network.class.moduleFieldNames"]], "modulefields() (network.class iterator)": [[5, "Network.class.moduleFields"]], "modulefromspec() (in module network)": [[5, "Network.moduleFromSpec"]], "moduleinstances (in module network)": [[5, "Network.moduleInstances"]], "modulenames() (network.module iterator)": [[5, "Network.Module.moduleNames"]], "modules() (network.module iterator)": [[5, "Network.Module.modules"]], "n (in module network)": [[5, "Network.n"]], "namedmodules() (network.module iterator)": [[5, "Network.Module.namedModules"]], "par() (network.module method)": [[5, "Network.Module.par"]], "parameternames() (network.module iterator)": [[5, "Network.Module.parameterNames"]], "parameters() (network.module iterator)": [[5, "Network.Module.parameters"]], "postinit() (network.class method)": [[5, "Network.class.postinit"]], "prettyprint() (network.moduleattributes method)": [[5, "Network.moduleAttributes.prettyPrint"]], "prettyprintspec() (network.moduleattributes method)": [[5, "Network.moduleAttributes.prettyPrintSpec"]], "registermodules() (network.class method)": [[5, "Network.class.registerModules"]], "setup() (network.conv2d method)": [[5, "Network.Conv2D.setup"]], "setup() (network.module method)": [[5, "Network.Module.setup"]], "setup() (in module network)": [[5, "Network.setup"]], "signature() (network.module method)": [[5, "Network.Module.signature"]], "these() (network.modulechildren iterator)": [[5, "Network.moduleChildren.these"]], "this() (network.module method)": [[5, "Network.Module.this"]], "this() (network.class method)": [[5, "Network.class.this"]], "weight (in module network)": [[5, "Network.weight"]], "ordereddict (module)": [[6, "module-OrderedDict"]], "dict (record in ordereddict)": [[6, "OrderedDict.dict"]], "dict.keytype (in module ordereddict)": [[6, "OrderedDict.dict.keyType"]], "dict.order (in module ordereddict)": [[6, "OrderedDict.dict.order"]], "dict.table (in module ordereddict)": [[6, "OrderedDict.dict.table"]], "dict.valtype (in module ordereddict)": [[6, "OrderedDict.dict.valType"]], "init() (ordereddict.dict method)": [[6, "OrderedDict.dict.init"]], "insert() (ordereddict.dict method)": [[6, "OrderedDict.dict.insert"]], "keys() (ordereddict.dict iterator)": [[6, "OrderedDict.dict.keys"]], "size() (ordereddict.dict method)": [[6, "OrderedDict.dict.size"]], "these() (ordereddict.dict iterator)": [[6, "OrderedDict.dict.these"]], "values() (ordereddict.dict iterator)": [[6, "OrderedDict.dict.values"]], "remote (class in remote)": [[7, "Remote.Remote"]], "remote (module)": [[7, "module-Remote"]], "remote.elttype (in module remote)": [[7, "Remote.Remote.eltType"]], "remote.value (in module remote)": [[7, "Remote.Remote.value"]], "_remotevarcontainer (class in remote)": [[7, "Remote._RemoteVarContainer"]], "_remotevarcontainer.containedvalue (in module remote)": [[7, "Remote._RemoteVarContainer.containedValue"]], "copy() (remote.remote method)": [[7, "Remote.Remote.copy"]], "copycontainer() (remote.remote method)": [[7, "Remote.Remote.copyContainer"]], "copyto() (remote.remote method)": [[7, "Remote.Remote.copyTo"]], "defaultdevice() (remote.remote method)": [[7, "Remote.Remote.defaultDevice"]], "device() (remote.remote method)": [[7, "Remote.Remote.device"]], "get() (remote.remote method)": [[7, "Remote.Remote.get"]], "init() (remote.remote method)": [[7, "Remote.Remote.init"]], "ptr() (remote.remote method)": [[7, "Remote.Remote.ptr"]], "ref() (in module remote)": [[7, "Remote.ref"]], "to() (remote.remote method)": [[7, "Remote.Remote.to"]], "simpledomain (module)": [[8, "module-SimpleDomain"]], "init() (simpledomain.rect method)": [[8, "SimpleDomain.rect.init"]], "rect (record in simpledomain)": [[8, "SimpleDomain.rect"]], "rect.offset (in module simpledomain)": [[8, "SimpleDomain.rect.offset"]], "rect.rank (in module simpledomain)": [[8, "SimpleDomain.rect.rank"]], "rect.shape (in module simpledomain)": [[8, "SimpleDomain.rect.shape"]], "size() (simpledomain.rect method)": [[8, "SimpleDomain.rect.size"]], "zerotup() (in module simpledomain)": [[8, "SimpleDomain.zeroTup"]], "*() (in module statictensor)": [[9, "StaticTensor.*"]], "+() (in module statictensor)": [[9, "StaticTensor.+"]], "-() (in module statictensor)": [[9, "StaticTensor.-"]], "/() (in module statictensor)": [[9, "StaticTensor./"]], ":() (in module statictensor)": [[9, "StaticTensor.:"]], "statictensor (module)": [[9, "module-StaticTensor"]], "_dom() (statictensor.tensor method)": [[9, "StaticTensor.tensor._dom"]], "_setarraydata() (statictensor.tensor method)": [[9, "StaticTensor.tensor._setArrayData"]], "arange() (statictensor.tensor method)": [[9, "StaticTensor.tensor.arange"]], "convolve() (statictensor.tensor method)": [[9, "StaticTensor.tensor.convolve"]], "detach() (statictensor.tensor method)": [[9, "StaticTensor.tensor.detach"]], "diag (in module statictensor)": [[9, "StaticTensor.diag"]], "dilate() (statictensor.tensor method)": [[9, "StaticTensor.tensor.dilate"]], "exp() (statictensor.tensor method)": [[9, "StaticTensor.tensor.exp"]], "expand() (statictensor.tensor method)": [[9, "StaticTensor.tensor.expand"]], "fromshape() (statictensor.tensor method)": [[9, "StaticTensor.tensor.fromShape"]], "init() (statictensor.tensor method)": [[9, "StaticTensor.tensor.init"]], "main() (in module statictensor)": [[9, "StaticTensor.main"]], "matvec() (in module statictensor)": [[9, "StaticTensor.matvec"]], "matvecmul() (statictensor.tensor method)": [[9, "StaticTensor.tensor.matvecmul"]], "matvecmulfast() (statictensor.tensor method)": [[9, "StaticTensor.tensor.matvecmulFast"]], "max() (statictensor.tensor method)": [[9, "StaticTensor.tensor.max"]], "maxpool() (statictensor.tensor method)": [[9, "StaticTensor.tensor.maxPool"]], "meta() (statictensor.tensor method)": [[9, "StaticTensor.tensor.meta"]], "n (in module statictensor)": [[9, "StaticTensor.n"]], "ones() (statictensor.tensor method)": [[9, "StaticTensor.tensor.ones"]], "pad() (statictensor.tensor method)": [[9, "StaticTensor.tensor.pad"]], "permute() (statictensor.tensor method)": [[9, "StaticTensor.tensor.permute"]], "read() (statictensor.tensor method)": [[9, "StaticTensor.tensor.read"]], "relu() (statictensor.tensor method)": [[9, "StaticTensor.tensor.relu"]], "reshape() (statictensor.tensor method)": [[9, "StaticTensor.tensor.reshape"]], "reshapedomain() (statictensor.tensor method)": [[9, "StaticTensor.tensor.reshapeDomain"]], "serialize() (statictensor.tensor method)": [[9, "StaticTensor.tensor.serialize"]], "shrink() (statictensor.tensor method)": [[9, "StaticTensor.tensor.shrink"]], "size (in module statictensor)": [[9, "StaticTensor.size"]], "slice() (statictensor.tensor method)": [[9, "StaticTensor.tensor.slice"]], "softmax() (statictensor.tensor method)": [[9, "StaticTensor.tensor.softmax"]], "sum() (statictensor.tensor method)": [[9, "StaticTensor.tensor.sum"]], "tensor (record in statictensor)": [[9, "StaticTensor.tensor"]], "tensor.elttype (in module statictensor)": [[9, "StaticTensor.tensor.eltType"]], "tensor.rank (in module statictensor)": [[9, "StaticTensor.tensor.rank"]], "tensor.resource (in module statictensor)": [[9, "StaticTensor.tensor.resource"]], "tensorfromctx() (in module statictensor)": [[9, "StaticTensor.tensorFromCtx"]], "this() (statictensor.tensor method)": [[9, "StaticTensor.tensor.this"]], "unsqueeze() (statictensor.tensor method)": [[9, "StaticTensor.tensor.unsqueeze"]], "zeros() (statictensor.tensor method)": [[9, "StaticTensor.tensor.zeros"]], "tensor (module)": [[10, "module-Tensor"]], "utilities (module)": [[11, "module-Utilities"]], "argsort() (in module utilities)": [[11, "Utilities.argsort"]], "cartesian() (in module utilities)": [[11, "Utilities.cartesian"]], "debugprint (in module utilities)": [[11, "Utilities.debugPrint"]], "debugwrite() (in module utilities)": [[11, "Utilities.debugWrite"]], "domainfromshape() (in module utilities)": [[11, "Utilities.domainFromShape"]], "emptydomain() (in module utilities)": [[11, "Utilities.emptyDomain"]], "err() (in module utilities)": [[11, "Utilities.err"]], "fasteach() (in module utilities)": [[11, "Utilities.fastEach"]], "flatiter() (in module utilities)": [[11, "Utilities.flatIter"]], "indexat() (in module utilities)": [[11, "Utilities.indexAt"]], "indexathelpermultiples() (in module utilities)": [[11, "Utilities.indexAtHelperMultiples"]], "indexathelperprod() (in module utilities)": [[11, "Utilities.indexAtHelperProd"]], "indexinshape() (in module utilities)": [[11, "Utilities.indexInShape"]], "loopgpusupport (in module utilities)": [[11, "Utilities.loopGpuSupport"]], "nbase() (in module utilities)": [[11, "Utilities.nbase"]], "normalizearray() (in module utilities)": [[11, "Utilities.normalizeArray"]], "normalizedomain() (in module utilities)": [[11, "Utilities.normalizeDomain"]], "rangefrombound() (in module utilities)": [[11, "Utilities.rangeFromBound"]], "rangefromstart() (in module utilities)": [[11, "Utilities.rangeFromStart"]], "rangesfrombounds() (in module utilities)": [[11, "Utilities.rangesFromBounds"]], "rangesfromshape() (in module utilities)": [[11, "Utilities.rangesFromShape"]], "targetgpu() (in module utilities)": [[11, "Utilities.targetGpu"]], "standard (module)": [[12, "module-Standard"]], "countoccurrences() (standard.string method)": [[12, "Standard.string.countOccurrences"]], "drop() (standard.string method)": [[12, "Standard.string.drop"]], "each() (standard._domain iterator)": [[12, "Standard._domain.each"]], "each() (standard._tuple iterator)": [[12, "Standard._tuple.each"]], "elttype() (standard._tuple method)": [[12, "Standard._tuple.eltType"]], "every() (standard._domain iterator)": [[12, "Standard._domain.every"]], "everyzip() (standard._domain iterator)": [[12, "Standard._domain.everyZip"]], "fastnormaldims() (standard._domain method)": [[12, "Standard._domain.fastNormalDims"]], "fastshape() (standard._domain method)": [[12, "Standard._domain.fastShape"]], "imagetype() (standard._tuple method)": [[12, "Standard._tuple.imageType"]], "indexat() (standard._domain method)": [[12, "Standard._domain.indexAt"]], "indexat() (standard._tuple method)": [[12, "Standard._tuple.indexAt"]], "insertidx() (standard._tuple method)": [[12, "Standard._tuple.insertIdx"]], "isnormal() (standard._domain method)": [[12, "Standard._domain.isNormal"]], "map() (standard._tuple method)": [[12, "Standard._tuple.map"]], "myshape() (standard._domain method)": [[12, "Standard._domain.myShape"]], "normalize() (standard._domain method)": [[12, "Standard._domain.normalize"]], "removeidx() (standard._tuple method)": [[12, "Standard._tuple.removeIdx"]], "slice() (standard._tuple method)": [[12, "Standard._tuple.slice"]], "slice() (standard.string method)": [[12, "Standard.string.slice"]], "take() (standard.string method)": [[12, "Standard.string.take"]], "takeuntil() (standard.string method)": [[12, "Standard.string.takeUntil"]], "this() (standard.string method)": [[12, "Standard.string.this"]], "untuplify() (standard._tuple method)": [[12, "Standard._tuple.untuplify"]], "types (module)": [[13, "module-Types"]], "f32 (in module types)": [[13, "Types.f32"]], "f64 (in module types)": [[13, "Types.f64"]], "stdrange (in module types)": [[13, "Types.stdRange"]]}}) \ No newline at end of file diff --git a/fmtTest.chpl b/fmtTest.chpl new file mode 100644 index 000000000..7462d00b9 --- /dev/null +++ b/fmtTest.chpl @@ -0,0 +1,16 @@ +use IO.FormattedIO; + + +const D = {0..<5,0..<5}; +const A: [D] int; + + + +use IO, JSON; + +var jsout = stdout.withSerializer(jsonSerializer); +jsout.writeln(A); + +const fmt = "%ij".format(A); +writeln(fmt); + diff --git a/job.sh b/job.sh new file mode 100644 index 000000000..762ed7137 --- /dev/null +++ b/job.sh @@ -0,0 +1,8 @@ +#!/bin/bash +#SBATCH --job-name=ChAI_perf_test +#SBATCH --nodes=${NUM_NODES} +#SBATCH --time=03:00:00 +#SBATCH --mail-type=ALL +#SBATCH --mail-user=iain.moncrief@hpe.com + +python3 times.py measure "./MultiLocaleInference -nl ${NUM_NODES} --numImages=${NUM_IMAGES} --numTries=10 --printResults=false" --name "ml_test_${num_nodes}_${num_images}" \ No newline at end of file diff --git a/lib/Autograd.chpl b/lib/Autograd.chpl index cd9f3f317..31a02059e 100644 --- a/lib/Autograd.chpl +++ b/lib/Autograd.chpl @@ -61,37 +61,50 @@ class ForgetfulTensor : TensorEssence { class BaseTensorResource : TensorEssence, serializable{ param rank: int; // type eltType = real(64); - var dataResource: remote(ndarray(rank,eltType)); - var gradResource: remote(ndarray(rank,eltType)); + var dataResource: shared Remote(ndarray(rank,eltType)); + var gradResource: shared Remote(ndarray(rank,eltType))?; // forwarding resource only to, access, device; - proc to(device_: locale) { - dataResource.to(device_); - gradResource.to(device_); + proc init(type eltType, param rank: int) { + super.init(eltType); + this.rank = rank; + this.dataResource = new shared Remote(ndarray(rank,eltType)); } - proc device : locale { - if dataResource.device != gradResource.device then halt("data resource and grad resource devices do not match. "); - return dataResource.device; + proc init(in dataResource: shared Remote(ndarray(?rank,?eltType)), in gradResource: shared Remote(ndarray(rank,eltType))? = nil) { + super.init(eltType); + this.rank = rank; + this.dataResource = dataResource; + this.gradResource = gradResource; + } + + proc init(data: ndarray(?rank,?eltType), device: locale = Remote.defaultDevice) { + on device var dataResource: shared Remote(ndarray(rank,eltType)) = data; + this.init(dataResource,nil); + } + + + proc to(dest: locale) { + dataResource.to(dest); + if gradResource then gradResource!.to(dest); } + proc device : locale do + return dataResource.device; + proc array ref : ndarray(rank,eltType) do + return dataResource.ptr; + + proc grad ref : ndarray(rank,eltType) do + return gradResource!.ptr; // Tensor resource interface proc forward() do halt("Forward function not defined for BaseTensorResource."); proc backward(grad: remote(ndarray(rank,eltType)), param alreadyPopulated = false) do halt("Backward function not defined for BaseTensorResource."); proc backward() where rank == 1 do halt("Backward function not defined for BaseTensorResource."); - proc array ref : ndarray(rank,eltType) do - return dataResource.access(); - proc data ref : [] eltType do - return dataResource.access().data; - proc grad ref : ndarray(rank,eltType) do - return gradResource.access(); - proc gradData ref : ndarray(rank,eltType) do - return gradResource.access().data; - - proc _loc do return device; + proc detach(copy: bool = true, keepGrad: bool = false): owned TensorResource(eltType,rank,baseValue) do + halt("Not implemented."); override proc runtimeRank: int do return rank; @@ -99,113 +112,92 @@ class BaseTensorResource : TensorEssence, serializable{ class TensorResource : BaseTensorResource(?), serializable { - type operation; - - var operationData: operation; + type operationType; + var operationCtx: operationType; - proc init(param rank: int, type eltType, type operation) { + proc init(type eltType, param rank: int, operationCtx: ?operationType) { super.init(eltType,rank); - this.operation = operation; + this.operationType = operationType; + this.operationCtx = operationCtx; } - proc init(param rank: int, type eltType, operationData: ?operation) { - super.init(eltType,rank); - this.operation = operation; - this.operationData = operationData; + proc init(in dataResource: shared Remote(ndarray(?rank,?eltType)),in gradResource: shared Remote(ndarray(rank,eltType))? =nil, operationCtx: ?operationType) { + super.init(dataResource,gradResource); + this.operationType = operationType; + this.operationCtx = operationCtx; } - proc init(ref resource: remote(ndarray(?rank,?eltType)), operationData: ?operation, device_: locale = defaultDevice) { - resource.to(device_); - var dataRes = resource; - var gradRes = new remote(ndarray(rank,eltType)); - super.init(eltType,rank,dataRes,gradRes); - this.operation = operation; - this.operationData = operationData; - } + proc init(in dataResource: shared Remote(ndarray(?rank,?eltType))) do + this.init(dataResource,nil,new baseValue()); - proc init(tr: shared BaseTensorResource(?eltType,?rank),param forget: bool) where forget == true { - super.init(eltType,rank,tr.dataResource,new remote(ndarray(rank,eltType))); - // super.rank = rank; - // super.dataResource = tr.dataResource; - // super.gradResource = new remote(ndarray(rank,eltType)); - this.operation = baseValue; - this.operationData = new baseValue(); - } + // Overwriting history initializer + proc init(bt: borrowed BaseTensorResource(?eltType,?rank), operationCtx: ?operationType) do + this.init(shared.adopt(bt.dataResource.copy()),shared.adopt(bt.gradResource!.copy()),new baseValue()); - // proc init(param rank: int, type eltType, operationData: ?operation, device: locale) { - // var res = new remote(ndarray(rank,eltType),device); - // this.init(res,operationData,device); - // init this; - // this.forward(); - // } - - proc init(data: ndarray(?rank,?eltType),operationData: ?operation, device_: locale = defaultDevice) { - var res = data.toRemote(); - res.to(device_); - this.init(res,operationData,device_); - } - - override proc forward() { - if operationData.type != baseValue { - - on dataResource.device { - // ref data = dataResource.access().data; - // data = operationData.forward(); - dataResource = operationData.forward(); - param requiresGrad = false; - if requiresGrad { - if gradResource.access().data.size == 0 { - gradResource.access().reshapeDomain(dataResource.access().domain); - } - } - } + override proc detach(copy: bool = true, keepGrad: bool = false): owned TensorResource(eltType,rank,baseValue) { + var dr: shared Remote(ndarray(rank,eltType)) = dataResource; + var gr: shared Remote(ndarray(rank,eltType))? = if keepGrad then gradResource else nil; + if copy { + dr = shared.adopt(dr.copy()); + if gr != nil then + gr = shared.adopt(gr!.copy()); } + return new TensorResource(dr,gr,new baseValue()); } - override proc backward(grad: remote(ndarray(rank,eltType)), param alreadyPopulated: bool = false) { - if operationData.type == baseValue then return; - - var childrenRefs = operationData.children; - - grad.to(device); + override proc forward() { + if operationType == baseValue then return; on device { - ref myGradData = gradResource.access().data; - ref gArrRef = grad.localAccess(); - // const gArrRef = g; - if !alreadyPopulated { - ref gData = gArrRef.data; - myGradData += gData; // This is likely to fail if there is a shape mismatch. - } - ref gArr = gradResource.localAccess(); - const childGrads = operationData.backward(gArr); - for param i in 0..= 1 then here.gpus[0] else here; +class _RemoteVarContainer : serializable { + var containedValue; +} // meow class Remote : serializable { type eltType; - var device: locale = defaultDevice; - var item: _remoteVarWrapper(eltType); + var value: owned _RemoteVarContainer(eltType); - proc init(item: ?eltType,device: locale = defaultDevice) { + proc ref get() ref do + return this; + + proc ptr ref do + return value.containedValue; + + proc device: locale do + return ptr.locale; + + + proc init(in value: owned _RemoteVarContainer(?eltType)) { this.eltType = eltType; - this.device = device; - this.item = chpl__buildRemoteWrapper(device,eltType,item); + this.value = value; } - proc init(type eltType,device: locale = defaultDevice) { - this.eltType = eltType; - this.device = device; - this.item = chpl__buildRemoteWrapper(device,eltType); + proc init(value: ?eltType, device: locale = Remote.defaultDevice) where !isSubtype(eltType,Remote(?)) { + compilerWarning("This initializer doesn't offer the best performance. "); + var v: owned _RemoteVarContainer(eltType)?; + on device do v = new _RemoteVarContainer(value); + this.init(try! v : owned _RemoteVarContainer(eltType)); } - proc to(device_: locale) { - if this.device == device_ then return; - this.device = device_; - on device_ { - this.item = chpl__buildRemoteWrapper(device_,__primitive("create thunk",item.get())); + proc init(type eltType, in tr: _thunkRecord, device: locale = Remote.defaultDevice) { + var v: owned _RemoteVarContainer(eltType)?; + on device { + var val: eltType = tr; + v = new _RemoteVarContainer(val); } + this.init(try! v : owned _RemoteVarContainer(eltType)); } - proc ref get() ref { - return this.item.get(); + proc init(type eltType, device: locale = Remote.defaultDevice) { + var v: owned _RemoteVarContainer(eltType)?; + on device { + var val: eltType; + v = new _RemoteVarContainer(val); + } + this.init(try! v : owned _RemoteVarContainer(eltType)); } - proc serialize(writer,serializer) { - var sr = serializer.startClass(writer,"Remote",2); - sr.writeField("device",device.id); - sr.writeField("item", item); - sr.endClass(); + proc copyContainer(dest: locale = device): owned _RemoteVarContainer(eltType) { + var c: owned _RemoteVarContainer(eltType)?; + on dest { + var val: eltType = ptr; + c = new _RemoteVarContainer(val); + } + return try! c : owned _RemoteVarContainer(eltType); } -} - -record remote : serializable { - type eltType; - var remoteResource: shared Remote(eltType); - // forwarding remoteResource only to, get; + proc copyTo(dest: locale = device): owned Remote(eltType) do + return new Remote(copyContainer(dest)); + proc copy(): owned Remote(eltType) do + return copyTo(device); - proc init(type eltType,device: locale = defaultDevice) { - this.eltType = eltType; - this.remoteResource = new shared Remote(eltType,device); - } - - proc init(item: ?eltType,device: locale = defaultDevice) { - this.eltType = eltType; - this.remoteResource = new shared Remote(item,device); - } - - // proc init(other: remote(?eltType)) { - // this.eltType = eltType; - // this.remoteResource = other.remoteResource; - // } - - // proc init=(other: remote(?eltType)) { - // this.eltType = eltType; - // this.remoteResource = other.remoteResource; - // } - - proc device ref do return this.remoteResource.device; - proc ref get() ref { - return this.remoteResource.item.get(); - } - proc to(device_: locale) do this.remoteResource.to(device_); - - proc copy(): remote(eltType) { - var rem = new remote(eltType,this.device); - on device { - const data: eltType = remoteResource.item.get(); - ref reData: eltType = rem.remoteResource.item.get(); - reData = data; - } - return rem; + proc to(dest: locale) { + if dest == device then return; + value = copyContainer(dest); } +} +proc ref (owned Remote(?eltType)).get() ref : owned Remote(eltType) do + return this; - proc ref access() ref { - // if here != this.device { try! throw new Error("Trying to access memory on wrong device!"); } - // if here != this.device { - // this.to(here); - // if debug then writeln("moved " + this.device.name + " -> " + here.name); - // } - return this.remoteResource.item.get(); - } +proc ref (shared Remote(?eltType)).get() ref : shared Remote(eltType) do + return this; - proc localAccess() ref do return this.remoteResource.item.get(); +proc ref (unmanaged Remote(?eltType)).get() ref : unmanaged Remote(eltType) do + return this; - proc download(): eltType { - var it: eltType; - on this.device { - const it_: eltType = this.remoteResource.item.get(); - it = it_; - } - return it; - } +proc type Remote.defaultDevice: locale do + return if here.gpus.size >= 1 then here.gpus[0] else here; - proc ref unload(): eltType { - return this.remoteResource.get(); - } - // proc ref to(device: locale) { - // on device { - // this.device = device; - // this.item = chpl__buildRemoteWrapper(device,eltType,remoteResource.get()); - // } - // // if this.device == device then return; - // // if here != this._parentDevice { - // // on this.device { - // // this.to(device); - // // } - // // } else { - // // on device var itm = this.item.get(); - // // this.device = device; - // // this.item = chpl__buildRemoteWrapper(device,eltType,itm); - // // } - // } - - // proc ref copyTo(device: locale, parentDevice: locale = this._parentDevice) { - // // on device var itemResource: eltType = this.item.get(); - // // on device var me: remote(eltType) = new remote(itemResource); - // // var newRemote = - // // var c: owned _remoteVarContainer(eltType)?; - // // on loc do c = new _remoteVarContainer(value); - // // return new _remoteVarWrapper(try! c : owned _remoteVarContainer(inType)); - - // var c: owned _remoteVarContainer(eltType)?; - // on device do c = new _remoteVarContainer(this.item.get()); - // return new remote(c,device,parentDevice); - // } - - +public use ChapelRemoteVars; +private inline proc __defaultValue(type t) { + var tmp: t; + return tmp; } +inline proc chpl__buildRemoteWrapper(loc: locale, type inType: Remote(?eltType)) do + return chpl__buildRemoteWrapper(loc, inType, __primitive("create thunk", __defaultValue(eltType))); +inline proc chpl__buildRemoteWrapper(loc: locale, type inType: owned Remote(?eltType), in tr: _thunkRecord) { + var c: owned _RemoteVarContainer(eltType)?; + on loc { + var forced: eltType = __primitive("force thunk", tr); + c = new _RemoteVarContainer(forced); + } + return new owned Remote(try! c : owned _RemoteVarContainer(eltType)); +} +inline proc chpl__buildRemoteWrapper(loc: locale, type inType: shared Remote(?eltType), in tr: _thunkRecord) { + var c: owned _RemoteVarContainer(eltType)?; + on loc { + var forced: eltType = __primitive("force thunk", tr); + c = new _RemoteVarContainer(forced); + } + return new shared Remote(try! c : owned _RemoteVarContainer(eltType)); +} +} diff --git a/lib/StaticTensor.chpl b/lib/StaticTensor.chpl index f4186616d..d87068b95 100644 --- a/lib/StaticTensor.chpl +++ b/lib/StaticTensor.chpl @@ -11,40 +11,41 @@ record tensor : serializable { param rank: int; type eltType = real(64); var resource: shared BaseTensorResource(eltType,rank); - forwarding resource only to, array, grad, device, backward; - + forwarding resource only to, array, grad, device ;//backward; proc meta do return this.resource; - proc _dom do return this.array.domain; + proc _dom do return resource.array.domain; proc init(param rank: int, type eltType = real(64)) { this.rank = rank; this.eltType = eltType; - this.resource = new shared TensorResource(rank,eltType,baseValue); + this.resource = new shared TensorResource(eltType,rank,new baseValue()); } - proc init(resource: shared BaseTensorResource(?eltType,?rank)) { + proc init(in resource: shared BaseTensorResource(?eltType,?rank)) { this.rank = rank; this.eltType = eltType; this.resource = resource; } - proc init(nda: ndarray(?rank,?eltType)) { + proc init(in resource: owned BaseTensorResource(?eltType,?rank)) { + this.init(shared.adopt(resource)); + } + + proc init(array: ndarray(?rank,?eltType)) { this.rank = rank; this.eltType = eltType; - this.resource = new shared TensorResource(nda,new baseValue()); + on Remote.defaultDevice var ar: shared Remote(ndarray(rank,eltType)) = array; + this.resource = new shared TensorResource(ar); } proc init(dom: domain(?),type eltType = real) { const normal = util.normalizeDomain(dom); - this.rank = dom.rank; + param rank = normal.rank; + on Remote.defaultDevice var ar: shared Remote(ndarray(rank,eltType)) = new ndarray(normal,eltType); + this.rank = rank; this.eltType = eltType; - this.resource = new shared TensorResource(rank,eltType,baseValue); - init this; - on this.device { - this.array.reshapeDomain(normal); - // this.grad.reshapeDomain(normal); - } + this.resource = new shared TensorResource(ar); } proc init(arr: [] ?eltType) do @@ -64,7 +65,6 @@ record tensor : serializable { ref arr = this.array; ref gra = this.grad; arr.reshapeDomain(dom); - // gra.reshapeDomain(dom); } } @@ -76,16 +76,19 @@ record tensor : serializable { } } - proc detach(): tensor(rank,eltType) { - if var tr = this.meta : borrowed TensorResource(eltType,rank,baseValue)? then - return this; - else - return new tensor(new shared TensorResource(this.resource,forget = true)); + proc detach(copy: bool = true, keepGrad: bool = false): tensor(rank,eltType) { + return new tensor(meta.detach(copy,keepGrad)); } } +operator :(in t: tensor(?rank,?eltType), type toType): tensor(rank,toType) { + const a = t.array; + const b = a : toType; + return new tensor(b); +} + proc tensorFromCtx(param rank: int, type eltType, ctx): tensor(rank,eltType) { - var newMeta = new shared TensorResource(rank,eltType,ctx); + var newMeta = new owned TensorResource(eltType,rank,ctx); newMeta.forward(); return new tensor(newMeta); } @@ -245,13 +248,16 @@ proc type tensor.convolve(features: tensor(3,?eltType),kernel: tensor(4,eltType) } proc type tensor.convolve(features: tensor(3,?eltType),kernel: tensor(4,eltType), bias: tensor(1,eltType), stride: int): tensor(3,eltType) { - var conv = new tensor(3,eltType); - on conv.device { - conv.array = ndarray.convolve(features.array,kernel.array,bias.array,stride); + // on here.gpus[0] var x: shared Remote(ndarray(3,eltType)) = ndarray.convolve(features.array,kernel.array,bias.array,stride); + + var t = new tensor(3,eltType); + on t.device { + t.array = ndarray.convolve(features.array,kernel.array,bias.array,stride); } - return conv; + return t; } + proc type tensor.matvecmulFast(mat: tensor(2,?eltType),vec: tensor(1,eltType)): tensor(1,eltType) { var u = new tensor(1,eltType); on u.device { @@ -341,7 +347,7 @@ proc main() { var t = new tensor(2,real); t.array.reshapeDomain({0..<3,0..<5}); - t.to(defaultDevice); + t.to(Remote.defaultDevice); on t.device { ref tarr = t.array; ref tdata = tarr.data; diff --git a/lib/Tensor.chpl b/lib/Tensor.chpl index 386128bd8..71c5e551a 100644 --- a/lib/Tensor.chpl +++ b/lib/Tensor.chpl @@ -4,7 +4,7 @@ module Tensor { public use NDArray; public use StaticTensor; public use DynamicTensor; - + public use Utilities.Types; // public import Utilities as util; // public use Utilities.Standard; diff --git a/lib/Utilities.chpl b/lib/Utilities.chpl index d8022e7a0..719aecdef 100644 --- a/lib/Utilities.chpl +++ b/lib/Utilities.chpl @@ -1,10 +1,15 @@ module Utilities { - config param loopGpuSupport = false; + private use ChplConfig only CHPL_LOCALE_MODEL; + config param loopGpuSupport = CHPL_LOCALE_MODEL == "gpu"; + + proc targetGpu() param : bool do return loopGpuSupport && CHPL_LOCALE_MODEL == "gpu"; module Types { type stdRange = range(idxType=int,bounds=boundKind.both,strides=strideKind.one); // type stdDomain = domain(DefaultRectangularDom(?)); + type f32 = real(32); + type f64 = real(64); } import IO; @@ -83,9 +88,7 @@ module Utilities { } inline proc normalizeDomain(dom: domain(?)): domain(dom.rank,int) /*where dom.strides == strideKind.one*/ { - const shape = dom.shape; - const normalDom = domainFromShape((...shape)); - return normalDom; + return dom.normalize; } inline proc emptyDomain(param rank: int) : domain(rank,int) { @@ -376,7 +379,7 @@ module Utilities { foreach i in 0..