Model Creation

Model Creation

class flexflow.core.flexflow_cffi.FFModel
__init__(ffconfig)

Constructor of FFModel.

Parameters

ffconfig (FFConfig) – configurations of FlexFlow and the created model.

Returns

FFModel – the model.

Tensor Creation

class flexflow.core.flexflow_cffi.FFModel
create_tensor(dims, data_type, create_grad=True)

Instantiate a FlexFlow tensor.

Parameters
  • x (list of int) – a shape tuple/list (integers), including the batch size.

  • data_type (DataType) – the datatype of the created tensor. Options are DT_FLOAT, DT_DOUBLE, DT_INT32, DT_INT64, DT_BOOLEAN.

  • create_grad (bool) – weather the tensor creates a gradients vector. If you don’t specify anything, a gradients vector is used.

Returns

Tensor – the output tensor.