Loading...
Searching...
No Matches
CudaEngine.h File Reference
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Classes

struct  gpr_scheme2_cuda_table_v1
 Moduli and CRT tables of one inner dimension (Context::Impl::Table). More...
struct  gpr_scheme2_cuda_operand_v1
struct  gpr_scheme2_cuda_task_v1

Typedefs

typedef struct gpr_scheme2_cuda_table_v1 gpr_scheme2_cuda_table_v1
 Moduli and CRT tables of one inner dimension (Context::Impl::Table).
typedef struct gpr_scheme2_cuda_operand_v1 gpr_scheme2_cuda_operand_v1
typedef struct gpr_scheme2_cuda_task_v1 gpr_scheme2_cuda_task_v1

Functions

void * gpr_scheme2_cuda_create_v1 (int device, char *error, size_t capacity)
 device < 0 selects the local rank modulo the visible device count.
void gpr_scheme2_cuda_destroy_v1 (void *engine)
int gpr_scheme2_cuda_describe_v1 (void *engine, char *text, size_t capacity)
 One line naming the device.
int gpr_scheme2_cuda_run_v1 (void *engine, const gpr_scheme2_cuda_table_v1 *table, const gpr_scheme2_cuda_operand_v1 *operands, int32_t operand_count, const gpr_scheme2_cuda_task_v1 *tasks, int32_t task_count, char *error, size_t capacity)
 Products of every task. Operands are copied to the device once per call.
int gpr_scheme2_cuda_gemm_s8_v1 (void *engine, int64_t m, int64_t n, int64_t k, const int8_t *r, int64_t ldr, const int8_t *s, int64_t lds, int32_t *c, int64_t ldc, char *error, size_t capacity)

Typedef Documentation

◆ gpr_scheme2_cuda_operand_v1

typedef struct gpr_scheme2_cuda_operand_v1 gpr_scheme2_cuda_operand_v1

One prepared operand, element (e, l) with e < extent indexing rows of op(A) or columns of op(B) and l < depth the inner dimension. Either values (binary64 at values[l * ld + e], or values[e * ld + l] when l_contiguous; residues formed on the device) or residues (count blocks of extent * depth signed bytes, [l * extent + e] for row operands and [e * depth + l] for column operands) is given.

◆ gpr_scheme2_cuda_table_v1

typedef struct gpr_scheme2_cuda_table_v1 gpr_scheme2_cuda_table_v1

Moduli and CRT tables of one inner dimension (Context::Impl::Table).

◆ gpr_scheme2_cuda_task_v1

typedef struct gpr_scheme2_cuda_task_v1 gpr_scheme2_cuda_task_v1

Output block (row0 .. row0 + m) x (col0 .. col0 + n) of the product of operands rows and cols. values[i + j * ld] receives the unscaled product P_ij in binary64, before alpha and beta.

Function Documentation

◆ gpr_scheme2_cuda_create_v1()

void * gpr_scheme2_cuda_create_v1 ( int device,
char * error,
size_t capacity )

device < 0 selects the local rank modulo the visible device count.

◆ gpr_scheme2_cuda_describe_v1()

int gpr_scheme2_cuda_describe_v1 ( void * engine,
char * text,
size_t capacity )

One line naming the device.

◆ gpr_scheme2_cuda_destroy_v1()

void gpr_scheme2_cuda_destroy_v1 ( void * engine)

◆ gpr_scheme2_cuda_gemm_s8_v1()

int gpr_scheme2_cuda_gemm_s8_v1 ( void * engine,
int64_t m,
int64_t n,
int64_t k,
const int8_t * r,
int64_t ldr,
const int8_t * s,
int64_t lds,
int32_t * c,
int64_t ldc,
char * error,
size_t capacity )

Column-major INT32 C (m x n) = R (m x k) S (k x n) for signed INT8 operands, k at most 65536.

◆ gpr_scheme2_cuda_run_v1()

int gpr_scheme2_cuda_run_v1 ( void * engine,
const gpr_scheme2_cuda_table_v1 * table,
const gpr_scheme2_cuda_operand_v1 * operands,
int32_t operand_count,
const gpr_scheme2_cuda_task_v1 * tasks,
int32_t task_count,
char * error,
size_t capacity )

Products of every task. Operands are copied to the device once per call.