helloadhavan/github_issues huggingface dataset:
Repository: ggml-org/llama.cpp
Pull request: android : Calculate required KV cache size by summing up tokens size and response token length (#12211)

Calculate required KV cache size by summing up tokens size and response token length.

previously:
`auto n_kv_req = tokens_list.size() + (n_len - tokens_list.size());`

now:
`auto n_kv_req = tokens_list.size() + n_len;`

Changed files:
filename: examples/llama.android/llama/src/main/cpp/llama-android.cpp
patch: @@ -361,7 +361,7 @@ Java_android_llama_cpp_LLamaAndroid_completion_1init(
     const auto tokens_list = common_tokenize(context, text, true, parse_special);
 
     auto n_ctx = llama_n_ctx(context);
-    auto n_kv_req = tokens_list.size() + (n_len - tokens_list.size());
+    auto n_kv_req = tokens_list.size() + n_len;
 
     LOGi("n_len = %d, n_ctx = %d, n_kv_req = %d", n_len, n_ctx, n_kv_req);
Repository: nodejs/node
Pull request: fix(build): uninstall support AIX 7.1

<!--
Before submitting a pull request, please read:

- the CONTRIBUTING guide at https://github.com/nodejs/node/blob/HEAD/CONTRIBUTING.md
- the commit message formatting guidelines at
  https://github.com/nodejs/node/blob/HEAD/doc/contributing/pull-requests.md#commit-message-guidelines

For code changes:
1. Include tests for any bug fixes or new features.
2. Update documentation if relevant.
3. Ensure that `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes.

If you believe this PR should be highlighted in the Node.js CHANGELOG
please add the `notable-change` label.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.
-->

This PR will fix #55437 , please have a look!

Changed files:
filename: tools/install.py
patch: @@ -4,10 +4,15 @@
 import ast
 import errno
 import os
+import platform
 import shutil
 import sys
 import re
 
+current_system = platform.system()
+
+SYSTEM_AIX = "AIX"
+
 def abspath(*args):
   path = os.path.join(*args)
   return os.path.abspath(path)
@@ -44,6 +49,7 @@ def try_rmdir_r(options, path):
     except OSError as e:
       if e.errno == errno.ENOTEMPTY: return
       if e.errno == errno.ENOENT: return
+      if e.errno == errno.EEXIST and current_system == SYSTEM_AIX: return
       raise
     path = abspath(path, '..')
Repository: facebook/react
Pull request: Make StrictMode double rendering flag static for FB/www

Once D28499651 lands, this will be at 100% for FB engineers. Let's cleanup the GK and make the dynamic feature flag static.

Changed files:
filename: packages/shared/forks/ReactFeatureFlags.www-dynamic.js
patch: @@ -41,7 +41,6 @@ export const deferRenderPhaseUpdateToNextBatch = !__VARIANT__;
 
 // These are already tested in both modes using the build type dimension,
 // so we don't need to use __VARIANT__ to get extra coverage.
-export const debugRenderPhaseSideEffectsForStrictMode = __DEV__;
 export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__;
 
 // TODO: These flags are hard-coded to the default values used in open source.

filename: packages/shared/forks/ReactFeatureFlags.www.js
patch: @@ -15,7 +15,6 @@ import typeof * as DynamicFeatureFlags from './ReactFeatureFlags.www-dynamic';
 const dynamicFeatureFlags: DynamicFeatureFlags = require('ReactFeatureFlags');
 
 export const {
-  debugRenderPhaseSideEffectsForStrictMode,
   disableInputAttributeSyncing,
   enableTrustedTypesIntegration,
   disableSchedulerTimeoutBasedOnReactExpirationTime,
@@ -40,6 +39,7 @@ export const {
 // On WWW, __EXPERIMENTAL__ is used for a new modern build.
 // It's not used anywhere in production yet.
 
+export const debugRenderPhaseSideEffectsForStrictMode = __DEV__;
 export const enableProfilerTimer = __PROFILE__;
 export const enableProfilerCommitHooks = __PROFILE__;
 export const enableProfilerNestedUpdatePhase = __PROFILE__;
Repository: huggingface/transformers
Pull request: Stop warnings from unnecessary torch.tensor() overuse

Users are getting errors caused by calling `torch.tensor()` on an input that is already a tensor. This is unnecessary because `kernel_size - stride` will already be a new tensor object, and so it doesn't need to be cloned/detached/converted with `torch.tensor()`.

Fixes #36533

Changed files:
filename: src/transformers/models/encodec/modeling_encodec.py
patch: @@ -121,7 +121,7 @@ def __init__(
 
         self.register_buffer("stride", stride, persistent=False)
         self.register_buffer("kernel_size", kernel_size, persistent=False)
-        self.register_buffer("padding_total", torch.tensor(kernel_size - stride, dtype=torch.int64), persistent=False)
+        self.register_buffer("padding_total", kernel_size - stride, persistent=False)
 
     def _get_extra_padding_for_conv1d(
         self,

filename: src/transformers/models/mimi/modeling_mimi.py
patch: @@ -161,7 +161,7 @@ def __init__(
 
         self.register_buffer("stride", stride, persistent=False)
         self.register_buffer("kernel_size", kernel_size, persistent=False)
-        self.register_buffer("padding_total", torch.tensor(kernel_size - stride, dtype=torch.int64), persistent=False)
+        self.register_buffer("padding_total", kernel_size - stride, persistent=False)
 
         # Asymmetric padding required for odd strides
         self.padding_right = self.padding_total // 2
Repository: huggingface/transformers
Pull request: Remove remote code warning

When `trust_remote_code=True` is passed to a non-Auto class, the class raises a warning that the argument has no effect, but continues.

This warning is getting thrown because some of our pipelines are passing the `trust_remote_code` kwarg through to the model. Users can't avoid this because `trust_remote_code` is required for the pipeline. I can dig into that in future, to make sure unnecessary args aren't going to `model.from_pretrained()` but for now I think we can just remove this warning because it's kind of pointless and our code needs fewer warnings anyway :sparkles: 

Fixes #36273

Changed files:
filename: src/transformers/modeling_utils.py
patch: @@ -3574,7 +3574,7 @@ def from_pretrained(
         proxies = kwargs.pop("proxies", None)
         output_loading_info = kwargs.pop("output_loading_info", False)
         use_auth_token = kwargs.pop("use_auth_token", None)
-        trust_remote_code = kwargs.pop("trust_remote_code", None)
+        _ = kwargs.pop("trust_remote_code", None)
         _ = kwargs.pop("mirror", None)
         from_pipeline = kwargs.pop("_from_pipeline", None)
         from_auto_class = kwargs.pop("_from_auto", False)
@@ -3665,11 +3665,6 @@ def from_pretrained(
 
         if use_safetensors is None and not is_safetensors_available():
             use_safetensors = False
-        if trust_remote_code is True:
-            logger.warning(
-                "The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is"
-                " ignored."
-            )
 
         if gguf_file is not None and not is_accelerate_available():
             raise ValueError("accelerate is required when loading a GGUF file `pip install accelerate`.")
Repository: denoland/deno
Pull request: test: fix node_compat_test

It's not clear to me how these tests worked correctly on CI,
 but they were failing hard locally because of two problems:
- missing env var that tests URL for fake npm registry
- trying to run a directory that contains native Node.js tests that
require a special harness

Changed files:
filename: tests/node_compat/test_runner.rs
patch: @@ -5,15 +5,18 @@ use util::deno_config_path;
 
 #[test]
 fn node_compat_tests() {
+  let _server = util::http_server();
+
   let mut deno = util::deno_cmd()
     .current_dir(util::root_path())
+    .envs(util::env_vars_for_npm_tests())
     .arg("test")
     .arg("--config")
     .arg(deno_config_path())
     .arg("--no-lock")
     .arg("--unstable")
     .arg("-A")
-    .arg(util::tests_path().join("node_compat"))
+    .arg(util::tests_path().join("node_compat/test.ts"))
     .spawn()
     .expect("failed to spawn script");
Repository: huggingface/transformers
Pull request: Fix AriaForConditionalGeneration flex attn test

We had some tests failing related to flex_attention. I don't think there is a real bug present related to flex_attention, but rather that we simply haven't marked classes correctly as not supporting flex_attention.

Here are the observations/assumptions I've made:
Aria supports flex_attention.
Idefics3VisionTransformer does not.
AriaForConditionalGeneration depends on Idefics3VisionTransformer.
AriaForConditionalGeneration does not support flex_attention.

If that seems correct, as well as my solution of just slapping a `_supports_flex_attn = False` on AriaForConditionalGeneration, then we're good to go 👍 

Changed files:
filename: src/transformers/models/aria/modeling_aria.py
patch: @@ -1380,6 +1380,7 @@ class AriaCausalLMOutputWithPast(ModelOutput):
 class AriaForConditionalGeneration(AriaPreTrainedModel, GenerationMixin):
     config_class = AriaConfig
     _supports_flash_attn_2 = False
+    _supports_flex_attn = False
     _supports_sdpa = False
     _tied_weights_keys = ["language_model.lm_head.weight"]
 

filename: src/transformers/models/aria/modular_aria.py
patch: @@ -1348,6 +1348,7 @@ class AriaCausalLMOutputWithPast(LlavaCausalLMOutputWithPast):
 class AriaForConditionalGeneration(AriaPreTrainedModel, GenerationMixin):
     config_class = AriaConfig
     _supports_flash_attn_2 = False
+    _supports_flex_attn = False
     _supports_sdpa = False
     _tied_weights_keys = ["language_model.lm_head.weight"]
Repository: electron/electron
Pull request: build: fix release, add newVersion for tagging

Backport of #42843

See that PR for details.


Notes: none


Changed files:
filename: script/release/prepare-release.js
patch: @@ -14,7 +14,11 @@ const readline = require('node:readline');
 const releaseNotesGenerator = require('./notes/index.js');
 const { getCurrentBranch, ELECTRON_DIR } = require('../lib/utils.js');
 const bumpType = args._[0];
-const targetRepo = bumpType === 'nightly' ? 'nightlies' : 'electron';
+const targetRepo = getRepo();
+
+function getRepo () {
+  return bumpType === 'nightly' ? 'nightlies' : 'electron';
+}
 
 const octokit = new Octokit({
   auth: process.env.ELECTRON_GITHUB_TOKEN
@@ -138,9 +142,10 @@ async function pushRelease (branch) {
   }
 }
 
-async function runReleaseBuilds (branch) {
+async function runReleaseBuilds (branch, newVersion) {
   await ciReleaseBuild(branch, {
-    ghRelease: true
+    ghRelease: true,
+    newVersion
   });
 }
 
@@ -170,6 +175,8 @@ async function verifyNewVersion () {
     console.log(`${fail} Aborting release of ${newVersion}`);
     process.exit();
   }
+
+  return newVersion;
 }
 
 async function promptForVersion (version) {
@@ -205,10 +212,10 @@ async function prepareRelease (isBeta, notesOnly) {
     } else {
       const changes = await changesToRelease();
       if (changes) {
-        await verifyNewVersion();
+        const newVersion = await verifyNewVersion();
         await createRelease(currentBranch, isBeta);
         await pushRelease(currentBranch);
-        await runReleaseBuilds(currentBranch);
+        await runReleaseBuilds(currentBranch, newVersion);
       } else {
         console.log('There are no new changes to this branch since the last release, aborting release.');
         process.exit(1);
Repository: denoland/deno
Pull request: test: deflake tests for rejection handled

Fixes flakiness for rejection handled tests on Windows (7 failures in the past day).

Changed files:
filename: tests/testdata/node/rejection_handled_web_process.ts
patch: @@ -23,4 +23,4 @@ setTimeout(() => {
 
 setTimeout(() => {
   console.log("Success");
-}, 500);
+}, 1000);

filename: tests/testdata/run/rejection_handled.ts
patch: @@ -14,4 +14,4 @@ setTimeout(async () => {
 
 setTimeout(() => {
   console.log("Success");
-}, 200);
+}, 1000);
Repository: ggml-org/llama.cpp
Pull request: opencl:Fix profile-related errors


fix some errors for opencl profile.

Changed files:
filename: ggml/src/ggml-opencl/ggml-opencl.cpp
patch: @@ -278,7 +278,7 @@ static ggml_backend_opencl_context * ggml_cl2_init(ggml_backend_dev_t dev) {
 
     cl_int err;
 
-#ifdef GGML_PROFILE_OPENCL
+#ifdef GGML_OPENCL_PROFILING
     GGML_LOG_INFO("ggml_opencl: OpenCL profiling enabled\n");
 #endif
 
@@ -3023,6 +3023,7 @@ static void ggml_cl_mul_mat(ggml_backend_t backend, const ggml_tensor * src0, co
         // enqueue kernel with profiling
         // <--------------------------------------------> //
     #ifdef GGML_OPENCL_PROFILING
+        cl_event evt;
         CL_CHECK(clEnqueueNDRangeKernel(queue, kernel, 3, NULL, global_work_size, local_work_size, 0, NULL, &evt));
 
         g_profiling_info.emplace_back();
Repository: huggingface/transformers
Pull request: Fix auto-assign reviewers

The `fnmatch` function didn't catch all of the cases I thought it did, so I had to write my own regex instead. I tested various cases that fail before and they work now!

A couple of lines in the codeowners file were also incorrect, so those have been rewritten.

Changed files:
filename: .github/scripts/assign_reviewers.py
patch: @@ -17,10 +17,19 @@
 import github
 import json
 from github import Github
-from fnmatch import fnmatch
+import re
 from collections import Counter
 from pathlib import Path
 
+def pattern_to_regex(pattern):
+    start_anchor = pattern.startswith("/")
+    pattern = re.escape(pattern)
+    # Replace `*` with "any number of non-slash characters"
+    pattern = pattern.replace(r"\*", "[^/]*")
+    if start_anchor:
+        pattern = "^" + pattern
+    return pattern
+
 def get_file_owners(file_path, codeowners_lines):
     # Process lines in reverse (last matching pattern takes precedence)
     for line in reversed(codeowners_lines):
@@ -36,18 +45,20 @@ def get_file_owners(file_path, codeowners_lines):
         owners = [owner.removeprefix("@") for owner in parts[1:]]
 
         # Check if file matches pattern
-        if fnmatch(file_path, pattern):
+        file_regex = pattern_to_regex(pattern)
+        if re.search(file_regex, file_path) is not None:
             return owners  # Remember, can still be empty!
     return []  # Should never happen, but just in case
 
 def main():
+    script_dir = Path(__file__).parent.absolute()
+    with open(script_dir / "codeowners_for_review_action") as f:
+        codeowners_lines = f.readlines()
+
     g = Github(os.environ['GITHUB_TOKEN'])
     repo = g.get_repo("huggingface/transformers")
     with open(os.environ['GITHUB_EVENT_PATH']) as f:
         event = json.load(f)
-    script_dir = Path(__file__).parent.absolute()
-    with open(script_dir / "codeowners_for_review_action") as f:
-        codeowners_lines = f.readlines()
 
     # The PR number is available in the event payload
     pr_number = event['pull_request']['number']

filename: .github/scripts/codeowners_for_review_action
patch: @@ -11,14 +11,14 @@ docs/ @stevhliu
 /src/transformers/models/*/image_processing* @qubvel
 /src/transformers/models/*/image_processing_*_fast* @yonigozlan
 
-
 # Owners of subsections of the library
 /src/transformers/generation/ @gante
 /src/transformers/pipeline/ @Rocketknight1 @yonigozlan
 /src/transformers/integrations/ @SunMarc @MekkCyber @muellerzr
 /src/transformers/quantizers/ @SunMarc @MekkCyber
-/src/transformers/tests/ @ydshieh
-/src/transformers/tests/generation/ @gante
+tests/ @ydshieh
+tests/generation/ @gante
+
 /src/transformers/models/auto/ @ArthurZucker
 /src/transformers/utils/ @ArthurZucker @Rocketknight1
 /src/transformers/loss/ @ArthurZucker
Repository: ggml-org/llama.cpp
Pull request: opencl: Fix `ulong` kernel args were set from `int` variables

... which left garbage bits in the upper half of the kernel args. This caused segmentation faults when running on PoCL.

- [x] *Make sure to read the [contributing guidelines](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md) before submitting a PR*


Changed files:
filename: ggml/src/ggml-opencl/ggml-opencl.cpp
patch: @@ -3765,10 +3765,10 @@ static void ggml_cl_rope(ggml_backend_t backend, const ggml_tensor * src0, const
     const int  ne02 = src0 ? src0->ne[2] : 0;
     const int  ne03 = src0 ? src0->ne[3] : 0;
 
-    const int  nb00 = src0 ? src0->nb[0] : 0;
-    const int  nb01 = src0 ? src0->nb[1] : 0;
-    const int  nb02 = src0 ? src0->nb[2] : 0;
-    const int  nb03 = src0 ? src0->nb[3] : 0;
+    const cl_ulong  nb00 = src0 ? src0->nb[0] : 0;
+    const cl_ulong  nb01 = src0 ? src0->nb[1] : 0;
+    const cl_ulong  nb02 = src0 ? src0->nb[2] : 0;
+    const cl_ulong  nb03 = src0 ? src0->nb[3] : 0;
 
     const int ne10 = src1 ? src1->ne[0] : 0;
     const int ne11 = src1 ? src1->ne[1] : 0; UNUSED(ne11);
@@ -3780,10 +3780,10 @@ static void ggml_cl_rope(ggml_backend_t backend, const ggml_tensor * src0, const
     const int  ne2 = dst ? dst->ne[2] : 0;
     const int  ne3 = dst ? dst->ne[3] : 0;
 
-    const int  nb0 = dst ? dst->nb[0] : 0;
-    const int  nb1 = dst ? dst->nb[1] : 0;
-    const int  nb2 = dst ? dst->nb[2] : 0;
-    const int  nb3 = dst ? dst->nb[3] : 0;
+    const cl_ulong  nb0 = dst ? dst->nb[0] : 0;
+    const cl_ulong  nb1 = dst ? dst->nb[1] : 0;
+    const cl_ulong  nb2 = dst ? dst->nb[2] : 0;
+    const cl_ulong  nb3 = dst ? dst->nb[3] : 0;
 
     GGML_ASSERT(ne10 % ne02 == 0);
     GGML_ASSERT(ne10 >= ne02);
Repository: facebook/react
Pull request: [Bugfix] Prevent already-committed setState callback from firing again during a rebase

First commit adds a failing test.

Second commit fixes it.

Changed files:
filename: packages/react-reconciler/src/ReactUpdateQueue.new.js
patch: @@ -580,7 +580,12 @@ export function processUpdateQueue<State>(
           instance,
         );
         const callback = update.callback;
-        if (callback !== null) {
+        if (
+          callback !== null &&
+          // If the update was already committed, we should not queue its
+          // callback again.
+          update.lane !== NoLane
+        ) {
           workInProgress.flags |= Callback;
           const effects = queue.effects;
           if (effects === null) {

filename: packages/react-reconciler/src/ReactUpdateQueue.old.js
patch: @@ -580,7 +580,12 @@ export function processUpdateQueue<State>(
           instance,
         );
         const callback = update.callback;
-        if (callback !== null) {
+        if (
+          callback !== null &&
+          // If the update was already committed, we should not queue its
+          // callback again.
+          update.lane !== NoLane
+        ) {
           workInProgress.flags |= Callback;
           const effects = queue.effects;
           if (effects === null) {

filename: packages/react-reconciler/src/__tests__/ReactClassSetStateCallback-test.js
patch: @@ -0,0 +1,47 @@
+let React;
+let ReactNoop;
+let Scheduler;
+
+describe('ReactClassSetStateCallback', () => {
+  beforeEach(() => {
+    jest.resetModules();
+
+    React = require('react');
+    ReactNoop = require('react-noop-renderer');
+    Scheduler = require('scheduler');
+  });
+
+  function Text({text}) {
+    Scheduler.unstable_yieldValue(text);
+    return text;
+  }
+
+  test('regression: setState callback (2nd arg) should only fire once, even after a rebase', async () => {
+    let app;
+    class App extends React.Component {
+      state = {step: 0};
+      render() {
+        app = this;
+        return <Text text={this.state.step} />;
+      }
+    }
+
+    const root = ReactNoop.createRoot();
+    await ReactNoop.act(async () => {
+      root.render(<App />);
+    });
+    expect(Scheduler).toHaveYielded([0]);
+
+    await ReactNoop.act(async () => {
+      app.setState({step: 1}, () =>
+        Scheduler.unstable_yieldValue('Callback 1'),
+      );
+      ReactNoop.flushSync(() => {
+        app.setState({step: 2}, () =>
+          Scheduler.unstable_yieldValue('Callback 2'),
+        );
+      });
+    });
+    expect(Scheduler).toHaveYielded([2, 'Callback 2', 2, 'Callback 1']);
+  });
+});
Repository: ggml-org/llama.cpp
Pull request: opencl: Fix not enough space in the buffer

Fix the following error:

```
ggml-alloc.c:99: not enough space in the buffer
ggml_tallocr_alloc: not enough space in the buffer to allocate blk.17.ffn_down.weight (needed 27525120, available 27521024)
```

which occurs when `ggml_backend_opencl_context::alignment` is larger than `cl_ptr_base` (hard-coded to `0x1000`).

Also, fix `ggml_backend_opencl_context::alignment` was set to `CL_DEVICE_MEM_BASE_ADDR_ALIGN` which was treated as bytes but the value is reported in bits.


Changed files:
filename: ggml/src/ggml-opencl/ggml-opencl.cpp
patch: @@ -524,7 +524,10 @@ static ggml_backend_opencl_context * ggml_cl2_init(ggml_backend_dev_t dev) {
         return backend_ctx;
     }
 
-    CL_CHECK(clGetDeviceInfo(device, CL_DEVICE_MEM_BASE_ADDR_ALIGN, sizeof(cl_uint), &backend_ctx->alignment, NULL));
+    cl_uint base_align_in_bits;
+    CL_CHECK(clGetDeviceInfo(device, CL_DEVICE_MEM_BASE_ADDR_ALIGN, sizeof(cl_uint), &base_align_in_bits, NULL));
+    GGML_ASSERT(base_align_in_bits % 8u == 0);
+    backend_ctx->alignment = base_align_in_bits / 8u;
     GGML_LOG_INFO("ggml_opencl: mem base addr align: %u\n", backend_ctx->alignment);
 
     clGetDeviceInfo(device, CL_DEVICE_MAX_MEM_ALLOC_SIZE, sizeof(size_t), &backend_ctx->max_alloc_size, NULL);
@@ -1198,17 +1201,14 @@ struct ggml_backend_opencl_buffer_context {
     std::string name;
 };
 
-static void * const cl_ptr_base = (void *)(uintptr_t) 0x1000;
-
 static void ggml_backend_opencl_buffer_free_buffer(ggml_backend_buffer_t buffer) {
     ggml_backend_opencl_buffer_context * ctx = (ggml_backend_opencl_buffer_context *) buffer->context;
     delete ctx;
 }
 
 static void * ggml_backend_opencl_buffer_get_base(ggml_backend_buffer_t buffer) {
-    return cl_ptr_base;
-
-    GGML_UNUSED(buffer);
+    ggml_backend_opencl_context * backend_ctx = ggml_cl2_init(buffer->buft->device);
+    return (void *) (uintptr_t) backend_ctx->alignment;
 }
 
 static enum ggml_status ggml_backend_opencl_buffer_init_tensor(ggml_backend_buffer_t buffer, ggml_tensor * tensor) {
@@ -1241,7 +1241,7 @@ static enum ggml_status ggml_backend_opencl_buffer_init_tensor(ggml_backend_buff
         tensor->extra = view_extra;
     } else {
         {
-            size_t offset = (char *)tensor->data - (char *)cl_ptr_base;
+            size_t offset = (char *) tensor->data - (char *) ggml_backend_opencl_buffer_get_base(buffer);
 
             ggml_tensor_extra_cl * extra = ctx->ggml_opencl_alloc_temp_tensor_extra();
             extra->offset = offset;