Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–406 unchanged (406 lines)
407 GGML_UNUSED(backend_src);
408 GGML_UNUSED(backend_dst);
409 GGML_UNUSED(src);
410 GGML_UNUSED(dst);
411}
412
413static enum ggml_status ggml_backend_metal_graph_compute(ggml_backend_t backend, ggml_cgraph * cgraph) {
414 ggml_metal_t ctx = (ggml_metal_t)backend->context;
415
416 return ggml_metal_graph_compute(ctx, cgraph);
417}
418
419static void ggml_backend_metal_graph_optimize(ggml_backend_t backend, ggml_cgraph * cgraph) {
420 ggml_metal_t ctx = (ggml_metal_t)backend->context;
421
422 ggml_metal_graph_optimize(ctx, cgraph);
423}
…lines 424–724 unchanged (301 lines)

After

…lines 1–406 unchanged (406 lines)
407 GGML_UNUSED(backend_src);
408 GGML_UNUSED(backend_dst);
409 GGML_UNUSED(src);
410 GGML_UNUSED(dst);
411}
412
413static enum ggml_status ggml_backend_metal_graph_compute(ggml_backend_t backend, ggml_cgraph * cgraph, int batch_size) {
414 ggml_metal_t ctx = (ggml_metal_t)backend->context;
415
416 return ggml_metal_graph_compute(ctx, cgraph);
417
418 GGML_UNUSED(batch_size);
419}
420
421static void ggml_backend_metal_graph_optimize(ggml_backend_t backend, ggml_cgraph * cgraph) {
422 ggml_metal_t ctx = (ggml_metal_t)backend->context;
423
424 ggml_metal_graph_optimize(ctx, cgraph);
…lines 425–726 unchanged (302 lines)

Before

translation_unit
preproc_include
#include "#include"
string_literal
" "\""
string_content "ggml-metal.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "ggml-impl.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "ggml-backend-impl.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "ggml-metal-device.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "ggml-metal-context.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "ggml-metal-ops.h"
" "\""
comment "// globals"
comment "// initialized in ggml_backend_metal_reg"
declaration
storage_class_specifier
static "static"
type_identifier "ggml_backend_reg"
identifier "g_ggml_metal_reg"
; ";"
declaration
storage_class_specifier
static "static"
type_identifier "ggml_backend_device"
identifier "g_ggml_metal_device"
; ";"
comment "////////////////////////////////////////////////////////////"...
comment "// backend interface"
comment "////////////////////////////////////////////////////////////"...
comment "// shared buffer"
function_definition (+56 nodes collapsed)
function_definition (+54 nodes collapsed)
function_definition (+77 nodes collapsed)
function_definition (+81 nodes collapsed)
function_definition (+81 nodes collapsed)
function_definition (+85 nodes collapsed)
function_definition (+57 nodes collapsed)
declaration (+40 nodes collapsed)
comment "// private buffer"
function_definition (+58 nodes collapsed)
function_definition (+56 nodes collapsed)
function_definition (+79 nodes collapsed)
function_definition (+83 nodes collapsed)
function_definition (+83 nodes collapsed)
function_definition (+87 nodes collapsed)
function_definition (+59 nodes collapsed)
declaration (+40 nodes collapsed)
comment "//"
comment "// buffer types"
comment "//"
comment "// common method for allocating shread or private Metal buff"...
function_definition (+89 nodes collapsed)
function_definition (+141 nodes collapsed)
comment "// default (shared) buffer type"
function_definition (+34 nodes collapsed)
function_definition (+32 nodes collapsed)
function_definition (+27 nodes collapsed)
function_definition (+45 nodes collapsed)
function_definition (+34 nodes collapsed)
function_definition (+27 nodes collapsed)
function_definition (+63 nodes collapsed)
comment "// default (private) buffer type"
function_definition (+34 nodes collapsed)
function_definition (+32 nodes collapsed)
function_definition (+27 nodes collapsed)
function_definition (+45 nodes collapsed)
function_definition (+34 nodes collapsed)
function_definition (+27 nodes collapsed)
function_definition (+63 nodes collapsed)
comment "// mapped buffer type"
function_definition (+34 nodes collapsed)
function_definition (+33 nodes collapsed)
function_definition (+27 nodes collapsed)
function_definition (+45 nodes collapsed)
function_definition (+34 nodes collapsed)
function_definition (+27 nodes collapsed)
function_definition (+65 nodes collapsed)
comment "// backend"
function_definition (+34 nodes collapsed)
function_definition (+55 nodes collapsed)
function_definition (+38 nodes collapsed)
function_definition (+68 nodes collapsed)
function_definition (+68 nodes collapsed)
function_definition (+69 nodes collapsed)
function_definition
storage_class_specifier
static "static"
enum_specifier
enum "enum"
type_identifier "ggml_status"
function_declarator
identifier "ggml_backend_metal_graph_compute"
parameter_list
( "("
parameter_declaration
type_identifier "ggml_backend_t"
identifier "backend"
, ","
parameter_declaration
type_identifier "ggml_cgraph"
pointer_declarator
* "*"
identifier "cgraph"
) ")"
compound_statement
{ "{"
declaration
type_identifier "ggml_metal_t"
init_declarator
identifier "ctx"
= "="
cast_expression
( "("
type_descriptor
type_identifier "ggml_metal_t"
) ")"
field_expression
identifier "backend"
-> "->"
field_identifier "context"
; ";"
return_statement
return "return"
call_expression
identifier "ggml_metal_graph_compute"
argument_list
( "("
identifier "ctx"
, ","
identifier "cgraph"
) ")"
; ";"
} "}"
function_definition (+46 nodes collapsed)
function_definition (+57 nodes collapsed)
declaration (+63 nodes collapsed)
function_definition (+62 nodes collapsed)
function_definition (+151 nodes collapsed)
function_definition (+38 nodes collapsed)
function_definition (+63 nodes collapsed)
function_definition (+56 nodes collapsed)
function_definition (+49 nodes collapsed)
comment "// backend device"
function_definition (+34 nodes collapsed)
function_definition (+46 nodes collapsed)
function_definition (+54 nodes collapsed)
function_definition (+29 nodes collapsed)
preproc_def
#define "#define"
identifier "GGML_METAL_NAME"
preproc_arg "\"Metal\""
function_definition (+129 nodes collapsed)
function_definition (+152 nodes collapsed)
function_definition (+66 nodes collapsed)
function_definition (+81 nodes collapsed)
function_definition (+49 nodes collapsed)
function_definition (+64 nodes collapsed)
function_definition (+75 nodes collapsed)
function_definition (+81 nodes collapsed)
declaration (+60 nodes collapsed)
comment "// backend registry"
function_definition (+34 nodes collapsed)
function_definition (+27 nodes collapsed)
function_definition (+52 nodes collapsed)
ERROR (+238 nodes collapsed)

After

translation_unit
preproc_include
#include "#include"
string_literal
" "\""
string_content "ggml-metal.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "ggml-impl.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "ggml-backend-impl.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "ggml-metal-device.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "ggml-metal-context.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "ggml-metal-ops.h"
" "\""
comment "// globals"
comment "// initialized in ggml_backend_metal_reg"
declaration
storage_class_specifier
static "static"
type_identifier "ggml_backend_reg"
identifier "g_ggml_metal_reg"
; ";"
declaration
storage_class_specifier
static "static"
type_identifier "ggml_backend_device"
identifier "g_ggml_metal_device"
; ";"
comment "////////////////////////////////////////////////////////////"...
comment "// backend interface"
comment "////////////////////////////////////////////////////////////"...
comment "// shared buffer"
function_definition (+56 nodes collapsed)
function_definition (+54 nodes collapsed)
function_definition (+77 nodes collapsed)
function_definition (+81 nodes collapsed)
function_definition (+81 nodes collapsed)
function_definition (+85 nodes collapsed)
function_definition (+57 nodes collapsed)
declaration (+40 nodes collapsed)
comment "// private buffer"
function_definition (+58 nodes collapsed)
function_definition (+56 nodes collapsed)
function_definition (+79 nodes collapsed)
function_definition (+83 nodes collapsed)
function_definition (+83 nodes collapsed)
function_definition (+87 nodes collapsed)
function_definition (+59 nodes collapsed)
declaration (+40 nodes collapsed)
comment "//"
comment "// buffer types"
comment "//"
comment "// common method for allocating shread or private Metal buff"...
function_definition (+89 nodes collapsed)
function_definition (+141 nodes collapsed)
comment "// default (shared) buffer type"
function_definition (+34 nodes collapsed)
function_definition (+32 nodes collapsed)
function_definition (+27 nodes collapsed)
function_definition (+45 nodes collapsed)
function_definition (+34 nodes collapsed)
function_definition (+27 nodes collapsed)
function_definition (+63 nodes collapsed)
comment "// default (private) buffer type"
function_definition (+34 nodes collapsed)
function_definition (+32 nodes collapsed)
function_definition (+27 nodes collapsed)
function_definition (+45 nodes collapsed)
function_definition (+34 nodes collapsed)
function_definition (+27 nodes collapsed)
function_definition (+63 nodes collapsed)
comment "// mapped buffer type"
function_definition (+34 nodes collapsed)
function_definition (+33 nodes collapsed)
function_definition (+27 nodes collapsed)
function_definition (+45 nodes collapsed)
function_definition (+34 nodes collapsed)
function_definition (+27 nodes collapsed)
function_definition (+65 nodes collapsed)
comment "// backend"
function_definition (+34 nodes collapsed)
function_definition (+55 nodes collapsed)
function_definition (+38 nodes collapsed)
function_definition (+68 nodes collapsed)
function_definition (+68 nodes collapsed)
function_definition (+69 nodes collapsed)
function_definition
storage_class_specifier
static "static"
enum_specifier
enum "enum"
type_identifier "ggml_status"
function_declarator
identifier "ggml_backend_metal_graph_compute"
parameter_list
( "("
parameter_declaration
type_identifier "ggml_backend_t"
identifier "backend"
, ","
parameter_declaration
type_identifier "ggml_cgraph"
pointer_declarator
* "*"
identifier "cgraph"
, ","
parameter_declaration
primitive_type "int"
identifier "batch_size"
) ")"
compound_statement
{ "{"
declaration
type_identifier "ggml_metal_t"
init_declarator
identifier "ctx"
= "="
cast_expression
( "("
type_descriptor
type_identifier "ggml_metal_t"
) ")"
field_expression
identifier "backend"
-> "->"
field_identifier "context"
; ";"
return_statement
return "return"
call_expression
identifier "ggml_metal_graph_compute"
argument_list
( "("
identifier "ctx"
, ","
identifier "cgraph"
) ")"
; ";"
expression_statement
call_expression
identifier "GGML_UNUSED"
argument_list
( "("
identifier "batch_size"
) ")"
; ";"
} "}"
function_definition (+46 nodes collapsed)
function_definition (+57 nodes collapsed)
declaration (+63 nodes collapsed)
function_definition (+62 nodes collapsed)
function_definition (+151 nodes collapsed)
function_definition (+38 nodes collapsed)
function_definition (+63 nodes collapsed)
function_definition (+56 nodes collapsed)
function_definition (+49 nodes collapsed)
comment "// backend device"
function_definition (+34 nodes collapsed)
function_definition (+46 nodes collapsed)
function_definition (+54 nodes collapsed)
function_definition (+29 nodes collapsed)
preproc_def
#define "#define"
identifier "GGML_METAL_NAME"
preproc_arg "\"Metal\""
function_definition (+129 nodes collapsed)
function_definition (+152 nodes collapsed)
function_definition (+66 nodes collapsed)
function_definition (+81 nodes collapsed)
function_definition (+49 nodes collapsed)
function_definition (+64 nodes collapsed)
function_definition (+75 nodes collapsed)
function_definition (+81 nodes collapsed)
declaration (+60 nodes collapsed)
comment "// backend registry"
function_definition (+34 nodes collapsed)
function_definition (+27 nodes collapsed)
function_definition (+52 nodes collapsed)
ERROR (+238 nodes collapsed)