Tensor library for machine learning
640 matches across 12 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | ci/run.sh | 1 | #/bin/bash |
| LOW | ci/run.sh | 241 | gg_printf '```\n' |
| LOW | ci/run.sh | 261 | # |
| LOW | include/ggml-cpp.h | 1 | #pragma once |
| LOW | include/ggml-sycl.h | 1 | // |
| LOW | include/ggml-backend.h | 1 | #pragma once |
| LOW | include/ggml-backend.h | 381 | // - most tensors have n_segments == 1 and a contiguous slice of the tensor data |
| LOW | include/ggml-cuda.h | 1 | #pragma once |
| LOW | include/ggml-opt.h | 1 | // This file contains functionality for training models using GGML. |
| LOW | include/ggml-opt.h | 181 | struct ggml_tensor * inputs, |
| LOW | include/ggml-metal.h | 1 | // Note: this description is outdated |
| LOW | include/ggml-metal.h | 21 | |
| LOW | include/gguf.h | 1 | // This file contains functionality related to "GGUF" files, the binary file format used by ggml. |
| LOW | include/gguf.h | 21 | // 1. The size of the tensor in the dimension (int64_t). |
| LOW | include/gguf.h | 161 | // add tensor to GGUF context, tensor name must be unique |
| LOW | include/gguf.h | 181 | // fwrite(f, ...); // write tensor data |
| LOW | include/ggml-rpc.h | 1 | #pragma once |
| LOW | include/ggml.h | 1 | #pragma once |
| LOW | include/ggml.h | 21 | // |
| LOW | include/ggml.h | 41 | // struct ggml_context * ctx = ggml_init(params); |
| LOW | include/ggml.h | 61 | // struct ggml_cgraph * gf = ggml_new_graph(ctx); |
| LOW | include/ggml.h | 81 | // and after defining the computation graph, call the ggml_used_mem() function to find out how much memory was |
| LOW | include/ggml.h | 101 | // - ggml_conv_1d_2s() |
| LOW | include/ggml.h | 121 | // assert(c->src[0] == a); |
| LOW | include/ggml.h | 141 | // *(float *) ((char *) a->data + y*a->nb[1] + x*a->nb[0]) = x + y; |
| LOW | include/ggml.h | 161 | // |
| LOW | include/ggml.h | 181 | # define GGML_API __declspec(dllimport) extern |
| LOW | include/ggml.h | 201 | #elif defined(__MINGW32__) && !defined(__clang__) |
| LOW | include/ggml.h | 221 | |
| LOW | include/ggml.h | 241 | #define GGML_MEM_ALIGN 8 |
| LOW | include/ggml.h | 261 | __host__ __device__ constexpr inline void ggml_unused_vars_impl(Args&&...) noexcept {} |
| LOW | include/ggml.h | 281 | #elif defined(_MSC_VER) |
| LOW | include/ggml.h | 1781 | struct ggml_context * ctx, |
| LOW | include/ggml.h | 1801 | // ext_factor = 0.0f |
| LOW | include/ggml.h | 1821 | float freq_base, |
| LOW | include/ggml.h | 1841 | // - for VISION, n_dims must be head_size/2 |
| LOW | include/ggml.h | 2101 | // example: |
| LOW | include/ggml.h | 2381 | GGML_API struct ggml_tensor * ggml_arange( |
| LOW | include/ggml.h | 2661 | struct ggml_tensor * adamw_params); // parameters such as the learning rate |
| LOW | include/ggml.h | 2681 | // [0 1 ... idx ... n-1] <-- ggml_build_forward_select(..., n, idx) |
| LOW | include/ggml.h | 2741 | |
| LOW | include/ggml.h | 2781 | # define GGML_RESTRICT __restrict__ |
| LOW | tests/test-conv2d.cpp | 1 | #include "ggml.h" |
| LOW | tests/test-timestep_embedding.cpp | 1 | #include "ggml.h" |
| LOW | tests/test-conv1d-dw-c1.cpp | 1 | #include "ggml.h" |
| LOW | tests/test-conv1d-dw-c2.cpp | 1 | #include "ggml.h" |
| LOW | tests/test-pad-reflect-1d.cpp | 1 | #include "ggml.h" |
| LOW | tests/test-quantize-fns.cpp | 1 | // Unit tests for quantization specific functions - quantize, dequantize and dot product |
| LOW | tests/test-roll.cpp | 1 | #include <ggml.h> |
| LOW | tests/test-opt.cpp | 1 | // TODO refactor |
| LOW | tests/test-conv-transpose-1d.cpp | 1 | #include "ggml.h" |
| LOW | tests/test-quantize-perf.cpp | 1 | // Benchmark quantization specific functions on synthetic data |
| LOW | tests/test-arange.cpp | 1 | #include "ggml.h" |
| LOW | tests/test-customop.c | 1 | #include "ggml.h" |
| LOW | tests/test-conv1d.cpp | 1 | #include "ggml.h" |
| LOW | tests/test-backend-ops.cpp | 1 | // This file defines tests for various GGML ops and backends. |
| LOW | tests/test-backend-ops.cpp | 21 | #include <ggml-cpp.h> |
| LOW | tests/test-backend-ops.cpp | 41 | #include <sstream> |
| LOW | tests/test-backend-ops.cpp | 421 | #define VARS_TO_STR2(a, b) VAR_TO_STR(a) + "," + VAR_TO_STR(b) |
| LOW | tests/test-backend-ops.cpp | 1901 | // #################################### |
| 522 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/test-backend-ops.cpp | 1932 | // Step 1: create input tensors that don't depend on any other tensors: |
| LOW | tests/test-backend-ops.cpp | 1939 | // Step 2: use the op that you want to test in the GGML compute graph. |
| LOW | tests/test-backend-ops.cpp | 1943 | // Step 3: return the output tensor. |
| LOW | src/ggml-webgpu/ggml-webgpu.cpp | 1290 | // For set rows specifically, we need to check if src and idx are empty |
| LOW | src/ggml-cann/aclnn_ops.cpp | 2809 | // Step 5: multiply by attn_factor |
| LOW | src/ggml-cann/aclnn_ops.cpp | 2826 | // Step 6: repeat |
| LOW | src/ggml-cann/aclnn_ops.cpp | 3090 | // Step 1: Prepare trans tensors for F16 type conversion to F32 if needed |
| LOW | src/ggml-cann/aclnn_ops.cpp | 3115 | // Step 2: Prepare head tensors for tail splitting if needed |
| LOW | src/ggml-cann/aclnn_ops.cpp | 3144 | // Step 3: Execute RotaryPositionEmbedding |
| LOW | src/ggml-cann/aclnn_ops.cpp | 3191 | // Step 4: Copy unrotated tail portion from source to destination |
| LOW | src/ggml-cann/aclnn_ops.cpp | 3220 | // Step 5: Cast back to F16 if needed |
| LOW | src/ggml-cann/aclnn_ops.cpp | 3906 | // Step 1: cast the src0 (Query) to fp16 if needed |
| LOW | src/ggml-cann/aclnn_ops.cpp | 3929 | // Step 2: create the acl tensors for src1 (Key), src2 (Value), |
| LOW | src/ggml-cann/aclnn_ops.cpp | 3973 | // Step 3: create the PSEShift tensor if needed |
| LOW | src/ggml-cann/aclnn_ops.cpp | 4042 | // Step 4: set the inputs for FusedInferAttention. |
| LOW | src/ggml-cann/aclnn_ops.cpp | 4103 | // Step 6: post-processing — slice padded output and/or cast to f32 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | examples/mnist/mnist-common.h | 20 | // The physical batch size determines how many datapoints are processed in parallel, larger values utilize compute bette |
| MEDIUM | src/ggml-zendnn/ggml-zendnn.cpp | 600 | // gather + batched matmul + scatter approach. Future versions will leverage |
| MEDIUM | src/ggml-cpu/amx/mmq.cpp | 603 | // pack again with 128 to fully utilize vector length |
| MEDIUM | src/ggml-cpu/amx/mmq.cpp | 645 | // pack again with 128 to fully utilize vector length |
| MEDIUM | src/ggml-cpu/amx/mmq.cpp | 743 | // pack again with 128 to fully utilize vector length |
| MEDIUM | src/ggml-opencl/ggml-opencl.cpp | 4396 | // that wraps around q and d to utilize image access path. |
| MEDIUM | src/ggml-opencl/ggml-opencl.cpp | 4430 | // that wraps around q and d to utilize image access path. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | examples/gpt-2/convert-ckpt-to-ggml.py | 0 | returns list of utf-8 byte and a corresponding list of unicode strings. the reversible bpe codes work on unicode strings |
| HIGH | examples/gpt-2/convert-h5-to-ggml.py | 0 | returns list of utf-8 byte and a corresponding list of unicode strings. the reversible bpe codes work on unicode strings |
| HIGH | examples/gpt-2/convert-cerebras-to-ggml.py | 0 | returns list of utf-8 byte and a corresponding list of unicode strings. the reversible bpe codes work on unicode strings |
| HIGH | examples/gpt-j/convert-h5-to-ggml.py | 0 | returns list of utf-8 byte and a corresponding list of unicode strings. the reversible bpe codes work on unicode strings |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | tests/test-backend-ops.cpp | 9804 | printf(" --test-file reads test operators from a test file generated by llama-export-graph-ops\n"); |
| HIGH | src/ggml-virtgpu/regenerate_remoting.py | 3 | # Generated by Claude AI |
| HIGH | src/ggml-hexagon/ggml-hexagon.cpp | 2484 | // Check for F16 support only as requested |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | include/ggml-backend.h | 211 | typedef ggml_backend_buffer_type_t (*ggml_backend_split_buffer_type_t)(int main_device, const float * tensor_split |
| LOW | examples/mnist/server.py | 9 | class CustomHTTPRequestHandler(http.server.SimpleHTTPRequestHandler): |
| LOW | examples/python/ggml/utils.py | 172 | def __check_shape_consistent_with_type(tensor: TensorLike): |
| LOW | src/ggml-virtgpu/regenerate_remoting.py | 49 | def _check_clang_format_available(self) -> bool: |
| LOW | src/ggml-virtgpu/regenerate_remoting.py | 53 | def _format_file_with_clang_format(self, file_path: Path) -> bool: |
| LOW | src/ggml-virtgpu/regenerate_remoting.py | 78 | def generate_backend_function_name(self, group_name: str, function_name: str) -> str: |
| LOW | src/ggml-virtgpu/regenerate_remoting.py | 89 | def generate_frontend_function_name(self, group_name: str, function_name: str) -> str: |
| LOW | src/ggml-virtgpu/regenerate_remoting.py | 125 | def generate_apir_backend_header(self) -> str: |
| LOW | src/ggml-virtgpu/regenerate_remoting.py | 176 | def generate_backend_dispatched_header(self) -> str: |
| LOW | src/ggml-virtgpu/regenerate_remoting.py | 222 | def generate_virtgpu_forward_header(self) -> str: |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | examples/mnist/server.py | 35 | print(f"Error: {e}") |
| LOW | examples/python/example_test_all_quants.py | 65 | except Exception as e: |
| MEDIUM | examples/python/example_test_all_quants.py | 66 | print(f'Error: {e}') |
| LOW | src/ggml-virtgpu/regenerate_remoting.py | 69 | except Exception as e: |
| LOW | src/ggml-virtgpu/regenerate_remoting.py | 327 | except Exception as e: |
| MEDIUM | src/ggml-virtgpu/regenerate_remoting.py | 323 | def main(): |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | scripts/sync-whisper-am.sh | 5 | # Usage: |
| LOW | scripts/release.sh | 8 | # Usage: |
| LOW | scripts/sync-llama-am.sh | 5 | # Usage: |
| LOW | src/ggml-sycl/dpct/helper.hpp | 3012 | /// Example usage: |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | scripts/release.sh | 124 | # Check if we have the latest from master (skip in dry-run) |
| LOW | src/ggml-virtgpu/regenerate_remoting.py | 46 | # Check if clang-format is available |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | ci/run.sh | 367 | # Create a fresh python3 venv and enter it |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | examples/python/stubs.py | 7 | |
| LOW | examples/gpt-2/convert-cerebras-to-ggml.py | 9 | |
| LOW | examples/gpt-j/convert-h5-to-ggml.py | 23 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | examples/python/ggml/utils.py | 118 | |
| LOW | src/ggml-webgpu/wgsl-shaders/embed_wgsl.py | 68 |