aboutsummaryrefslogtreecommitdiff
path: root/embed_cli.c
diff options
context:
space:
mode:
authorOnur Gündüz <ogunduz@gmail.com>2026-06-14 09:50:33 +0200
committerOnur Gündüz <ogunduz@gmail.com>2026-06-14 09:50:33 +0200
commit0853cd491deac3b606e4eeadd9c340b57227ebba (patch)
tree071ece54e1a0cb4c956490ec685662d939768620 /embed_cli.c
parent2961faafe2e755f728dda3054eb16f6fa2ac73be (diff)
downloadffwd-0853cd491deac3b606e4eeadd9c340b57227ebba.tar.gz
ffwd-0853cd491deac3b606e4eeadd9c340b57227ebba.zip
cli: remove --backend, use --mlx and --cuda consistently
Diffstat (limited to '')
-rw-r--r--embed_cli.c34
1 files changed, 4 insertions, 30 deletions
diff --git a/embed_cli.c b/embed_cli.c
index 03121a2..1d62fc2 100644
--- a/embed_cli.c
+++ b/embed_cli.c
@@ -449,32 +449,6 @@ int main(int argc, char *argv[])
else if (!strcmp(f, "-b") || !strcmp(f, "--batch-size")) {
batch_size = atoi(argv[++arg_start]);
}
- else if (!strcmp(f, "--backend")) {
- const char *backend = argv[++arg_start];
- if (!strcmp(backend, "mlx")) {
-#ifdef USE_MLX
- use_mlx = 1;
- use_cuda = 0;
-#else
- fprintf(stderr, "mlx backend not available (build with: make metal)\n");
- return 1;
-#endif
- } else if (!strcmp(backend, "cuda")) {
-#ifdef USE_CUDA
- use_cuda = 1;
- use_mlx = 0;
-#else
- fprintf(stderr, "cuda backend not available (build with: make cuda)\n");
- return 1;
-#endif
- } else if (!strcmp(backend, "cpu")) {
- use_mlx = 0;
- use_cuda = 0;
- } else {
- fprintf(stderr, "invalid --backend: %s\n", backend);
- return 1;
- }
- }
else if (!strcmp(f, "--mlx-quant-bits")) {
mlx_quantize_bits = atoi(argv[++arg_start]);
if (mlx_quantize_bits != 0 && mlx_quantize_bits != 8) {
@@ -506,7 +480,7 @@ int main(int argc, char *argv[])
use_mlx = 1;
use_cuda = 0;
#else
- fprintf(stderr, "--mlx not available (build with: make metal)\n");
+ fprintf(stderr, "--mlx not available (build with: make mlx)\n");
return 1;
#endif
}
@@ -533,7 +507,7 @@ int main(int argc, char *argv[])
if (cuda_fast_gemm) {
#ifdef USE_CUDA
if (!use_cuda) {
- fprintf(stderr, "--cuda-gemm-mode requires --cuda or --backend cuda\n");
+ fprintf(stderr, "--cuda-gemm-mode requires --cuda\n");
return 1;
}
if (embed_cuda_set_fast_gemm(cuda_fast_gemm) != 0) {
@@ -549,7 +523,7 @@ int main(int argc, char *argv[])
if (cuda_weights) {
#ifdef USE_CUDA
if (!use_cuda) {
- fprintf(stderr, "--cuda-weight-dtype requires --cuda or --backend cuda\n");
+ fprintf(stderr, "--cuda-weight-dtype requires --cuda\n");
return 1;
}
if (!strcmp(cuda_weights, "bf16")) {
@@ -583,7 +557,7 @@ int main(int argc, char *argv[])
}
if (mlx_quantize_bits && !use_mlx) {
- fprintf(stderr, "--mlx-quant-bits requires --mlx or --backend mlx\n");
+ fprintf(stderr, "--mlx-quant-bits requires --mlx\n");
return 1;
}