MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / ggml_new_f32

Function ggml_new_f32

ggml.c:2579–2589  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2577}
2578
2579struct ggml_tensor * ggml_new_f32(struct ggml_context * ctx, float value) {
2580 ggml_scratch_save(ctx);
2581
2582 struct ggml_tensor * result = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, 1);
2583
2584 ggml_scratch_load(ctx);
2585
2586 ggml_set_f32(result, value);
2587
2588 return result;
2589}
2590
2591struct ggml_tensor * ggml_dup_tensor(struct ggml_context * ctx, const struct ggml_tensor * src) {
2592 return ggml_new_tensor(ctx, src->type, src->n_dims, src->ne);

Callers 11

ggml_acc_or_setFunction · 0.70
ggml_compute_backwardFunction · 0.70
mainFunction · 0.50
forwardFunction · 0.50
forward_batchFunction · 0.50
forward_loraFunction · 0.50
cross_entropy_lossFunction · 0.50
build_graph_loraFunction · 0.50
llama_build_train_graphsFunction · 0.50

Calls 4

ggml_scratch_saveFunction · 0.85
ggml_scratch_loadFunction · 0.85
ggml_new_tensor_1dFunction · 0.70
ggml_set_f32Function · 0.70

Tested by 1

mainFunction · 0.40