[INFO] cloning repository https://github.com/KuangjuX/llama2-rs [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/KuangjuX/llama2-rs" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FKuangjuX%2Fllama2-rs", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FKuangjuX%2Fllama2-rs'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 79baa8259f23de4d196be000b3d7746e42305b2c [INFO] checking KuangjuX/llama2-rs against try#969026c535f4240ff7866ef11207dfda18a26af6 for pr-146504 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FKuangjuX%2Fllama2-rs" "/workspace/builds/worker-3-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/KuangjuX/llama2-rs [INFO] finished tweaking git repo https://github.com/KuangjuX/llama2-rs [INFO] tweaked toml for git repo https://github.com/KuangjuX/llama2-rs written to /workspace/builds/worker-3-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/KuangjuX/llama2-rs on toolchain 969026c535f4240ff7866ef11207dfda18a26af6 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+969026c535f4240ff7866ef11207dfda18a26af6" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/KuangjuX/llama2-rs already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+969026c535f4240ff7866ef11207dfda18a26af6" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded memmap2 v0.9.3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:e90291280db7d1fac5b66fc6dad9f9662629e7365a55743daf9bdf73ebc4ea79" "/opt/rustwide/cargo-home/bin/cargo" "+969026c535f4240ff7866ef11207dfda18a26af6" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] a2f012bd6412502f2bae16ad84e47969635c0fe832c486bd39c52030c8857526 [INFO] running `Command { std: "docker" "start" "-a" "a2f012bd6412502f2bae16ad84e47969635c0fe832c486bd39c52030c8857526", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "a2f012bd6412502f2bae16ad84e47969635c0fe832c486bd39c52030c8857526", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a2f012bd6412502f2bae16ad84e47969635c0fe832c486bd39c52030c8857526", kill_on_drop: false }` [INFO] [stdout] a2f012bd6412502f2bae16ad84e47969635c0fe832c486bd39c52030c8857526 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:e90291280db7d1fac5b66fc6dad9f9662629e7365a55743daf9bdf73ebc4ea79" "/opt/rustwide/cargo-home/bin/cargo" "+969026c535f4240ff7866ef11207dfda18a26af6" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] e149151c7206242816488634e66c4ac6f7bfe686da16176e44a3a8e820acc347 [INFO] running `Command { std: "docker" "start" "-a" "e149151c7206242816488634e66c4ac6f7bfe686da16176e44a3a8e820acc347", kill_on_drop: false }` [INFO] [stderr] Checking regex-syntax v0.8.2 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking memmap2 v0.9.3 [INFO] [stderr] Checking regex-automata v0.4.3 [INFO] [stderr] Checking regex v1.10.2 [INFO] [stderr] Checking env_logger v0.9.3 [INFO] [stderr] Checking llama2-rs v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/sampler.rs:32:23 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn random_f32(mut state: u64) -> f32 { [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/sampler.rs:32:23 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn random_f32(mut state: u64) -> f32 { [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `start` [INFO] [stdout] --> src/main.rs:41:13 [INFO] [stdout] | [INFO] [stdout] 41 | let mut start = 0; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_start` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `next` [INFO] [stdout] --> src/main.rs:43:13 [INFO] [stdout] | [INFO] [stdout] 43 | let mut next = 0; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_next` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `roken` [INFO] [stdout] --> src/main.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | let mut roken = prompt_tokens[0]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_roken` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `transformer` [INFO] [stdout] --> src/main.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | transformer: &mut Transformer, [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_transformer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `tokenizer` [INFO] [stdout] --> src/main.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | tokenizer: &Tokenizer, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_tokenizer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `sampler` [INFO] [stdout] --> src/main.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | sampler: &mut Sampler, [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_sampler` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | let mut start = 0; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | let mut next = 0; [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | let mut roken = prompt_tokens[0]; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | let mut pos = 0; [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `transformer` [INFO] [stdout] --> src/main.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 57 | transformer: Transformer, [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_transformer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `tokenizer` [INFO] [stdout] --> src/main.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | tokenizer: Tokenizer, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_tokenizer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `sampler` [INFO] [stdout] --> src/main.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | sampler: Sampler, [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_sampler` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cli_user_prompt` [INFO] [stdout] --> src/main.rs:60:5 [INFO] [stdout] | [INFO] [stdout] 60 | cli_user_prompt: &[u8], [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_cli_user_prompt` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cli_system_prompt` [INFO] [stdout] --> src/main.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | cli_system_prompt: &[u8], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_cli_system_prompt` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `steps` [INFO] [stdout] --> src/main.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | steps: i32, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_steps` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `chat` is never used [INFO] [stdout] --> src/main.rs:56:4 [INFO] [stdout] | [INFO] [stdout] 56 | fn chat( [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `rms_norm` is never used [INFO] [stdout] --> src/kernels.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn rms_norm(x: &[f32], weitht: &[f32], output: &mut [f32], size: usize) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `softmax` is never used [INFO] [stdout] --> src/kernels.rs:16:8 [INFO] [stdout] | [INFO] [stdout] 16 | pub fn softmax(x: &mut [f32], size: usize) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `matmul` is never used [INFO] [stdout] --> src/kernels.rs:35:8 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn matmul(x: &[f32], w: &[f32], o: &mut [f32], n: usize, d: usize) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `SwiGLU` is never used [INFO] [stdout] --> src/kernels.rs:47:8 [INFO] [stdout] | [INFO] [stdout] 47 | pub fn SwiGLU(x: &mut [f32], y: &[f32], size: usize) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `prob` and `index` are never read [INFO] [stdout] --> src/sampler.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 1 | pub struct ProbeIndex { [INFO] [stdout] | ---------- fields in this struct [INFO] [stdout] 2 | pub prob: f32, [INFO] [stdout] | ^^^^ [INFO] [stdout] 3 | pub index: u32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `vocab_size`, `prob_index`, `temperature`, `topp`, and `rng_state` are never read [INFO] [stdout] --> src/sampler.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Sampler { [INFO] [stdout] | ------- fields in this struct [INFO] [stdout] 7 | pub vocab_size: u32, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 8 | pub prob_index: Vec, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 9 | pub temperature: f32, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 10 | pub topp: f32, [INFO] [stdout] | ^^^^ [INFO] [stdout] 11 | pub rng_state: u64, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `random_u32` and `random_f32` are never used [INFO] [stdout] --> src/sampler.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 14 | impl Sampler { [INFO] [stdout] | ------------ associated functions in this implementation [INFO] [stdout] ... [INFO] [stdout] 25 | pub fn random_u32(mut state: u64) -> u32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 32 | pub fn random_f32(mut state: u64) -> f32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `BOS` is never used [INFO] [stdout] --> src/tokenizer.rs:10:18 [INFO] [stdout] | [INFO] [stdout] 10 | pub(super) const BOS: utok = 1; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `EOS` is never used [INFO] [stdout] --> src/tokenizer.rs:11:18 [INFO] [stdout] | [INFO] [stdout] 11 | pub(super) const EOS: utok = 2; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `words_offset` and `sorted_indices` are never read [INFO] [stdout] --> src/tokenizer.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 14 | pub(super) struct Tokenizer { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 18 | words_offset: Vec, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 19 | /// 保存根据 token 字符串字典序排序的序号,用于从 token 字符串查询序号。 [INFO] [stdout] 20 | sorted_indices: Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `encode`, `decode`, `find_token`, and `map_str` are never used [INFO] [stdout] --> src/tokenizer.rs:58:12 [INFO] [stdout] | [INFO] [stdout] 24 | impl Tokenizer { [INFO] [stdout] | -------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 58 | pub fn encode(&self, text: &str, bos: bool, eos: bool) -> Vec { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 111 | pub fn decode(&self, token: utok, next: utok) -> &str { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 125 | fn find_token(&self, token: &str) -> Option { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 133 | fn map_str(&self, index: utok) -> &str { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `k` and `v` are never read [INFO] [stdout] --> src/transformer.rs:93:9 [INFO] [stdout] | [INFO] [stdout] 79 | pub struct RunState { [INFO] [stdout] | -------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 93 | pub k: NonNull, [INFO] [stdout] | ^ [INFO] [stdout] 94 | /// value (dim,) [INFO] [stdout] 95 | pub v: NonNull, [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `fd` is never read [INFO] [stdout] --> src/transformer.rs:134:9 [INFO] [stdout] | [INFO] [stdout] 126 | pub struct Transformer { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 134 | pub fd: usize, [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `SwiGLU` should have a snake case name [INFO] [stdout] --> src/kernels.rs:47:8 [INFO] [stdout] | [INFO] [stdout] 47 | pub fn SwiGLU(x: &mut [f32], y: &[f32], size: usize) { [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `swi_glu` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `start` [INFO] [stdout] --> src/main.rs:41:13 [INFO] [stdout] | [INFO] [stdout] 41 | let mut start = 0; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_start` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `next` [INFO] [stdout] --> src/main.rs:43:13 [INFO] [stdout] | [INFO] [stdout] 43 | let mut next = 0; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_next` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `roken` [INFO] [stdout] --> src/main.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | let mut roken = prompt_tokens[0]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_roken` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `transformer` [INFO] [stdout] --> src/main.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | transformer: &mut Transformer, [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_transformer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `tokenizer` [INFO] [stdout] --> src/main.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | tokenizer: &Tokenizer, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_tokenizer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `sampler` [INFO] [stdout] --> src/main.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | sampler: &mut Sampler, [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_sampler` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | let mut start = 0; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | let mut next = 0; [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | let mut roken = prompt_tokens[0]; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | let mut pos = 0; [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `transformer` [INFO] [stdout] --> src/main.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 57 | transformer: Transformer, [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_transformer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `tokenizer` [INFO] [stdout] --> src/main.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | tokenizer: Tokenizer, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_tokenizer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `sampler` [INFO] [stdout] --> src/main.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | sampler: Sampler, [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_sampler` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cli_user_prompt` [INFO] [stdout] --> src/main.rs:60:5 [INFO] [stdout] | [INFO] [stdout] 60 | cli_user_prompt: &[u8], [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_cli_user_prompt` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cli_system_prompt` [INFO] [stdout] --> src/main.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | cli_system_prompt: &[u8], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_cli_system_prompt` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `steps` [INFO] [stdout] --> src/main.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | steps: i32, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_steps` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `chat` is never used [INFO] [stdout] --> src/main.rs:56:4 [INFO] [stdout] | [INFO] [stdout] 56 | fn chat( [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `rms_norm` is never used [INFO] [stdout] --> src/kernels.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn rms_norm(x: &[f32], weitht: &[f32], output: &mut [f32], size: usize) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `softmax` is never used [INFO] [stdout] --> src/kernels.rs:16:8 [INFO] [stdout] | [INFO] [stdout] 16 | pub fn softmax(x: &mut [f32], size: usize) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `matmul` is never used [INFO] [stdout] --> src/kernels.rs:35:8 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn matmul(x: &[f32], w: &[f32], o: &mut [f32], n: usize, d: usize) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `SwiGLU` is never used [INFO] [stdout] --> src/kernels.rs:47:8 [INFO] [stdout] | [INFO] [stdout] 47 | pub fn SwiGLU(x: &mut [f32], y: &[f32], size: usize) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `prob` and `index` are never read [INFO] [stdout] --> src/sampler.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 1 | pub struct ProbeIndex { [INFO] [stdout] | ---------- fields in this struct [INFO] [stdout] 2 | pub prob: f32, [INFO] [stdout] | ^^^^ [INFO] [stdout] 3 | pub index: u32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `vocab_size`, `prob_index`, `temperature`, `topp`, and `rng_state` are never read [INFO] [stdout] --> src/sampler.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Sampler { [INFO] [stdout] | ------- fields in this struct [INFO] [stdout] 7 | pub vocab_size: u32, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 8 | pub prob_index: Vec, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 9 | pub temperature: f32, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 10 | pub topp: f32, [INFO] [stdout] | ^^^^ [INFO] [stdout] 11 | pub rng_state: u64, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `random_u32` and `random_f32` are never used [INFO] [stdout] --> src/sampler.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 14 | impl Sampler { [INFO] [stdout] | ------------ associated functions in this implementation [INFO] [stdout] ... [INFO] [stdout] 25 | pub fn random_u32(mut state: u64) -> u32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 32 | pub fn random_f32(mut state: u64) -> f32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `BOS` is never used [INFO] [stdout] --> src/tokenizer.rs:10:18 [INFO] [stdout] | [INFO] [stdout] 10 | pub(super) const BOS: utok = 1; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `EOS` is never used [INFO] [stdout] --> src/tokenizer.rs:11:18 [INFO] [stdout] | [INFO] [stdout] 11 | pub(super) const EOS: utok = 2; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `words_offset` and `sorted_indices` are never read [INFO] [stdout] --> src/tokenizer.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 14 | pub(super) struct Tokenizer { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 18 | words_offset: Vec, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 19 | /// 保存根据 token 字符串字典序排序的序号,用于从 token 字符串查询序号。 [INFO] [stdout] 20 | sorted_indices: Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `encode`, `decode`, `find_token`, and `map_str` are never used [INFO] [stdout] --> src/tokenizer.rs:58:12 [INFO] [stdout] | [INFO] [stdout] 24 | impl Tokenizer { [INFO] [stdout] | -------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 58 | pub fn encode(&self, text: &str, bos: bool, eos: bool) -> Vec { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 111 | pub fn decode(&self, token: utok, next: utok) -> &str { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 125 | fn find_token(&self, token: &str) -> Option { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 133 | fn map_str(&self, index: utok) -> &str { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `k` and `v` are never read [INFO] [stdout] --> src/transformer.rs:93:9 [INFO] [stdout] | [INFO] [stdout] 79 | pub struct RunState { [INFO] [stdout] | -------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 93 | pub k: NonNull, [INFO] [stdout] | ^ [INFO] [stdout] 94 | /// value (dim,) [INFO] [stdout] 95 | pub v: NonNull, [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `fd` is never read [INFO] [stdout] --> src/transformer.rs:134:9 [INFO] [stdout] | [INFO] [stdout] 126 | pub struct Transformer { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 134 | pub fd: usize, [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `SwiGLU` should have a snake case name [INFO] [stdout] --> src/kernels.rs:47:8 [INFO] [stdout] | [INFO] [stdout] 47 | pub fn SwiGLU(x: &mut [f32], y: &[f32], size: usize) { [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `swi_glu` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.38s [INFO] running `Command { std: "docker" "inspect" "e149151c7206242816488634e66c4ac6f7bfe686da16176e44a3a8e820acc347", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e149151c7206242816488634e66c4ac6f7bfe686da16176e44a3a8e820acc347", kill_on_drop: false }` [INFO] [stdout] e149151c7206242816488634e66c4ac6f7bfe686da16176e44a3a8e820acc347