Idris2Doc : Compiler.Xla.PJRT.C.PjrtCApi

Compiler.Xla.PJRT.C.PjrtCApi

For internal spidr use, and use by plugin developers.

The Idris API for PJRT.

Reexports

importpublic Control.Monad.Either

Definitions

dataPjrtApi : Type
  For use by plugin developers.

A minimal wrapper round a C `PJRT_Api` struct pointer. The memory should be owned by the
code producing the pointer.

Totality: total
Visibility: public export
Constructor: 
MkPjrtApi : AnyPtr->PjrtApi
dataPjrtErrorCode : Type
  The cause of a `PjrtError`.

Totality: total
Visibility: public export
Constructors:
PJRT_Error_Code_CANCELLED : PjrtErrorCode
PJRT_Error_Code_UNKNOWN : PjrtErrorCode
PJRT_Error_Code_INVALID_ARGUMENT : PjrtErrorCode
PJRT_Error_Code_DEADLINE_EXCEEDED : PjrtErrorCode
PJRT_Error_Code_NOT_FOUND : PjrtErrorCode
PJRT_Error_Code_ALREADY_EXISTS : PjrtErrorCode
PJRT_Error_Code_PERMISSION_DENIED : PjrtErrorCode
PJRT_Error_Code_RESOURCE_EXHAUSTED : PjrtErrorCode
PJRT_Error_Code_FAILED_PRECONDITION : PjrtErrorCode
PJRT_Error_Code_ABORTED : PjrtErrorCode
PJRT_Error_Code_OUT_OF_RANGE : PjrtErrorCode
PJRT_Error_Code_UNIMPLEMENTED : PjrtErrorCode
PJRT_Error_Code_INTERNAL : PjrtErrorCode
PJRT_Error_Code_UNAVAILABLE : PjrtErrorCode
PJRT_Error_Code_DATA_LOSS : PjrtErrorCode
PJRT_Error_Code_UNAUTHENTICATED : PjrtErrorCode

Hint: 
ShowPjrtErrorCode
recordPjrtError : Type
  Indicates an error in the PJRT C layer, either due to internal errors or user error.

Totality: total
Visibility: public export
Constructor: 
MkPjrtError : String->MaybePjrtErrorCode->PjrtError

Projections:
.code : PjrtError->MaybePjrtErrorCode
  The error cause code, if one exists.
.message : PjrtError->String
  The error message.

Hint: 
ShowPjrtError
.message : PjrtError->String
  The error message.

Totality: total
Visibility: public export
message : PjrtError->String
  The error message.

Totality: total
Visibility: public export
.code : PjrtError->MaybePjrtErrorCode
  The error cause code, if one exists.

Totality: total
Visibility: public export
code : PjrtError->MaybePjrtErrorCode
  The error cause code, if one exists.

Totality: total
Visibility: public export
0Pjrt : Type->Type
  A `Pjrt a` produces an `a` or an error from the PJRT layer.

Totality: total
Visibility: public export
pjrtPluginInitialize : PjrtApi->Pjrt ()
  For use by plugin developers.

Initialize a PJRT plugin. Must be called before the PjrtApi is used.

Totality: total
Visibility: export
dataPjrtEvent : Type
  For internal spidr use only.

Totality: total
Visibility: export
Constructor: 
MkPjrtEvent : AnyPtr->PjrtEvent
pjrtEventAwait : PjrtApi->PjrtEvent->Pjrt ()
  For internal spidr use only.

Totality: total
Visibility: export
dataPjrtClient : Type
  For use by plugin developers.

Totality: total
Visibility: export
Constructor: 
MkPjrtClient : GCAnyPtr->PjrtClient
pjrtClientCreate : PjrtApi->PjrtPjrtClient
  For use by plugin developers.

Create a `PjrtClient`.

Totality: total
Visibility: export
dataPjrtProgram : Type
  For internal spidr use only.

Totality: total
Visibility: export
Constructor: 
MkPjrtProgram : GCAnyPtr->PjrtProgram
mkPjrtProgram : HasIOio=>CharArray->ioPjrtProgram
  For internal spidr use only.

The `CharArray` must live as long as the `PjrtProgram`.

Totality: total
Visibility: export
dataPjrtLoadedExecutable : Type
  For internal spidr use only.

Totality: total
Visibility: export
Constructor: 
MkPjrtLoadedExecutable : AnyPtr->PjrtLoadedExecutable
pjrtLoadedExecutableDestroy : HasIOio=>PjrtApi->PjrtLoadedExecutable->io ()
  For internal spidr use only.

Totality: total
Visibility: export
pjrtClientCompile : PjrtApi->PjrtClient->PjrtProgram->CharArray->PjrtPjrtLoadedExecutable
  For internal spidr use only.

It is up to the caller to free the `PjrtLoadedExecutable`.

Totality: total
Visibility: export
dataPjrtBuffer : Type
  For internal spidr use only.

Totality: total
Visibility: export
Constructor: 
MkPjrtBuffer : AnyPtr->PjrtBuffer
pjrtBufferDestroy : HasIOio=>PjrtApi->PjrtBuffer->io ()
  For internal spidr use only.

Totality: total
Visibility: export
pjrtLoadedExecutableExecute : PjrtApi->PjrtLoadedExecutable-> (outputs : Nat) ->Pjrt (VectoutputsPjrtBuffer)
  For internal spidr use only.

It is up to the caller to free the `PjrtBuffer`s.

Totality: total
Visibility: export
pjrtEventDestroy : HasIOio=>PjrtApi->PjrtEvent->io ()
  For internal spidr use only.

Totality: total
Visibility: export
pjrtBufferToHostBuffer : PjrtApi->PjrtBuffer->Literal->PjrtPjrtEvent
  For internal spidr use only.

It is up to the caller to free the `PjrtEvent`.

Totality: total
Visibility: export