add run script, comment debug code

This commit is contained in:
jianyuzh 2024-01-15 15:18:03 +08:00 committed by Meng, Hengyu
parent a8936f4902
commit 79d30d7713
3 changed files with 9 additions and 6 deletions

View file

@ -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 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 5. Check the device ID in output
Like Like

View file

@ -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) { 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_DEBUG("call %s\n", __func__);
ggml_sycl_op_flatten(src0, src1, dst, ggml_sycl_op_rms_norm); 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_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_src1", (struct ggml_tensor *)src1, 6);
log_tensor_with_cnt("log_ggml_sycl_rms_norm_dst", dst, 6); // log_tensor_with_cnt("log_ggml_sycl_rms_norm_dst", dst, 6);
// int *ptr = NULL;
// *ptr = 0;
} }
bool ggml_sycl_can_mul_mat(const struct ggml_tensor * src0, const struct ggml_tensor * src1, struct ggml_tensor * dst) { bool ggml_sycl_can_mul_mat(const struct ggml_tensor * src0, const struct ggml_tensor * src1, struct ggml_tensor * dst) {