From 79d30d77132668c1d4d5213a8b09e4f385eb903c Mon Sep 17 00:00:00 2001 From: jianyuzh Date: Mon, 15 Jan 2024 15:18:03 +0800 Subject: [PATCH] add run script, comment debug code --- README_sycl.md | 6 ++++++ run.sh => examples/sycl_run_llama2.sh | 0 ggml-sycl.cpp | 9 +++------ 3 files changed, 9 insertions(+), 6 deletions(-) rename run.sh => examples/sycl_run_llama2.sh (100%) diff --git a/README_sycl.md b/README_sycl.md index 6ab0deb7f..932b0e929 100644 --- a/README_sycl.md +++ b/README_sycl.md @@ -172,6 +172,12 @@ Set device ID = 0 by **GGML_SYCL_DEVICE=0** ``` GGML_SYCL_DEVICE=0 && ./build/bin/main -m models/llama-2-7b.Q4_0.gguf -p "Building a website can be done in 10 simple steps:" -n 400 -e -ngl 33 ``` +or run by script: + +``` +./examples/sycl_run_llama2.sh +``` + 5. Check the device ID in output Like: diff --git a/run.sh b/examples/sycl_run_llama2.sh similarity index 100% rename from run.sh rename to examples/sycl_run_llama2.sh diff --git a/ggml-sycl.cpp b/ggml-sycl.cpp index ba0c67d43..2e6e68650 100644 --- a/ggml-sycl.cpp +++ b/ggml-sycl.cpp @@ -10239,12 +10239,9 @@ static void ggml_sycl_pad(const ggml_tensor * src0, const ggml_tensor * src1, gg static void ggml_sycl_rms_norm(const ggml_tensor * src0, const ggml_tensor * src1, ggml_tensor * dst) { GGML_SYCL_DEBUG("call %s\n", __func__); ggml_sycl_op_flatten(src0, src1, dst, ggml_sycl_op_rms_norm); - log_tensor_with_cnt("log_ggml_sycl_rms_norm_src0", (struct ggml_tensor *)src0, 6); - log_tensor_with_cnt("log_ggml_sycl_rms_norm_src1", (struct ggml_tensor *)src1, 6); - log_tensor_with_cnt("log_ggml_sycl_rms_norm_dst", dst, 6); - - // int *ptr = NULL; - // *ptr = 0; + // log_tensor_with_cnt("log_ggml_sycl_rms_norm_src0", (struct ggml_tensor *)src0, 6); + // log_tensor_with_cnt("log_ggml_sycl_rms_norm_src1", (struct ggml_tensor *)src1, 6); + // log_tensor_with_cnt("log_ggml_sycl_rms_norm_dst", dst, 6); } bool ggml_sycl_can_mul_mat(const struct ggml_tensor * src0, const struct ggml_tensor * src1, struct ggml_tensor * dst) {