Skip to content

Commit f29aa56

Browse files
committed
remoting: highlight the hot path
1 parent c927b34 commit f29aa56

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

ggml/src/ggml-remotingfrontend/ggml-backend-device.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,21 @@ ggml_backend_remoting_device_get_memory(ggml_backend_dev_t dev, size_t * free, s
3838

3939
static bool
4040
ggml_backend_remoting_device_supports_op(ggml_backend_dev_t dev, const ggml_tensor * op) {
41-
IMPLEMENTED_ONCE;
41+
#if 1
42+
UNUSED(dev);
43+
UNUSED(op);
4244

45+
return true; // same as ggml-rpc
46+
#else
4347
struct virtgpu *gpu = DEV_TO_GPU(dev);
4448
4549
return apir_device_supports_op(gpu, op);
50+
#endif
4651
}
4752

4853
static bool
4954
ggml_backend_remoting_device_supports_buft(ggml_backend_dev_t dev, ggml_backend_buffer_type_t buft) {
50-
IMPLEMENTED_ONCE;
55+
//IMPLEMENTED_ONCE;
5156

5257
#if 1
5358
bool supported = buft->device == dev;
@@ -66,7 +71,7 @@ ggml_backend_remoting_device_supports_buft(ggml_backend_dev_t dev, ggml_backend_
6671

6772
static bool
6873
ggml_backend_remoting_device_offload_op(ggml_backend_dev_t dev, const ggml_tensor * op) {
69-
IMPLEMENTED_ONCE;
74+
//IMPLEMENTED_ONCE;
7075

7176
UNUSED(dev);
7277
UNUSED(op);

ggml/src/ggml-remotingfrontend/ggml-backend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
static const char * ggml_backend_remoting_get_name(ggml_backend_t backend) {
44
UNUSED(backend);
55

6-
IMPLEMENTED_ONCE;
6+
//IMPLEMENTED_ONCE;
77

88
return "API Remoting backend";
99
}

ggml/src/ggml-remotingfrontend/ggml-remoting.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
static bool first = true; \
5050
if (first) { \
5151
printf("INFO: ### reached implemented function %s\n", __func__); \
52-
first = false; \
52+
first = true; \
5353
} \
5454
} while(0)
5555

run.remoting.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ else
77
fi
88

99
MODEL="$HOME/models/llama3.2"
10-
PROMPT="say nothing"
10+
#PROMPT="say nothing"
11+
PROMPT="tell what's Apple metal API"
1112
$prefix \
1213
../build.remoting-frontend/bin/llama-run \
1314
--ngl 99 \

0 commit comments

Comments
 (0)