| ggml_are_same_layout | R Documentation |
Compares two tensors to check if they have identical type, shape, and strides. Tensors with the same layout can be used interchangeably for memory operations.
ggml_are_same_layout(a, b)
a |
External pointer to first tensor |
b |
External pointer to second tensor |
Logical indicating if tensors have identical layout
Other tensor:
ggml_get_op_params(),
ggml_get_op_params_f32(),
ggml_get_op_params_i32(),
ggml_set_op_params(),
ggml_set_op_params_f32(),
ggml_set_op_params_i32()
ctx <- ggml_init(1024 * 1024)
a <- ggml_new_tensor_2d(ctx, GGML_TYPE_F32, 4, 4)
b <- ggml_new_tensor_2d(ctx, GGML_TYPE_F32, 4, 4)
same <- ggml_are_same_layout(a, b) # TRUE
ggml_free(ctx)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.