helloadhavan/github_issues huggingface dataset:
Repository: denoland/deno
Pull request: fix(ext/node): export File class from node:buffer module

Node.js 20+ exports the `File` class from the `buffer` module. Currently Deno's `node:buffer` polyfill exports `Blob` but not `File`, which causes runtime errors like:

```
Error: Attempt to export a nullable value for "File"
```

This breaks frameworks that rely on `require('buffer').File`, such as Next.js with edge runtime (via Vercel's `edge-runtime` package).

The fix imports and re-exports the existing `File` class (from `ext:deno_web/09_file.js`, which already defines `File extends Blob`) through the buffer polyfill chain:

- `ext/node/polyfills/internal/buffer.mjs` - import and add to `mod` exports
- `ext/node/polyfills/buffer.ts` - re-export
- `ext/node/polyfills/internal/buffer.d.ts` - add type declarations

Added a test in `tests/unit_node/buffer_test.ts` that verifies `File` is correctly exported and constructable from `node:buffer`.

Closes #28120

Changed files:
filename: ext/node/polyfills/buffer.ts
patch: @@ -7,6 +7,7 @@ export {
   Buffer,
   constants,
   default,
+  File,
   INSPECT_MAX_BYTES,
   isAscii,
   isUtf8,

filename: ext/node/polyfills/internal/buffer.d.ts
patch: @@ -2052,6 +2052,7 @@ export const SlowBuffer: {
 
 export const atob: typeof globalThis.atob;
 export const Blob: Blob;
+export const File: typeof globalThis.File;
 export const btoa: typeof globalThis.btoa;
 export const constants: {
   MAX_LENGTH: number;
@@ -2063,6 +2064,7 @@ export const kStringMaxLength: number;
 declare const exports: {
   atob: typeof atob;
   Blob: Blob;
+  File: typeof File;
   btoa: typeof btoa;
   Buffer: Buffer;
   constants: typeof constants;

filename: ext/node/polyfills/internal/buffer.mjs
patch: @@ -114,10 +114,10 @@ import {
   forgivingBase64UrlEncode,
 } from "ext:deno_web/00_infra.js";
 import { atob, btoa } from "ext:deno_web/05_base64.js";
-import { Blob } from "ext:deno_web/09_file.js";
+import { Blob, File } from "ext:deno_web/09_file.js";
 import { untransferableSymbol } from "ext:deno_node/internal_binding/util.ts";
 
-export { atob, Blob, btoa };
+export { atob, Blob, btoa, File };
 
 const utf8Encoder = new TextEncoder();
 
@@ -3034,6 +3034,7 @@ const mod = {
   atob,
   btoa,
   Blob,
+  File,
   Buffer,
   constants,
   isAscii,

filename: tests/unit_node/buffer_test.ts
patch: @@ -1,5 +1,5 @@
 // Copyright 2018-2026 the Deno authors. MIT license.
-import { Buffer, constants } from "node:buffer";
+import { Buffer, constants, File as BufferFile } from "node:buffer";
 import { assertEquals, assertThrows } from "@std/assert";
 import { strictEqual } from "node:assert";
 
@@ -703,3 +703,17 @@ Deno.test({
     assertEquals(buf3, Buffer.from([0x12]));
   },
 });
+
+Deno.test({
+  name: "[node/buffer] File is exported from node:buffer",
+  fn() {
+    assertEquals(typeof BufferFile, "function");
+    const file = new BufferFile(["hello"], "hello.txt", {
+      type: "text/plain",
+    });
+    assertEquals(file.name, "hello.txt");
+    assertEquals(file.type, "text/plain");
+    assertEquals(file.size, 5);
+    assertEquals(file instanceof Blob, true);
+  },
+});
Repository: denoland/deno
Pull request: ci: skip lint status success on draft prs

Noticed this while working on a draft pr.

Tested on this PR:

<img width="362" height="124" alt="image" src="https://github.com/user-attachments/assets/66bfe276-2c2b-4813-bf65-7ab7dee1d693" />


Changed files:
filename: .github/workflows/ci.generate.ts
patch: @@ -1439,7 +1439,8 @@ const lintCiStatusJob = job("lint-ci-status", {
     ...buildJobs.map((j) => [j.buildJob, ...j.additionalJobs]).flat(),
     lintJob,
   ],
-  if: conditions.status.always(),
+  if: preBuildJob.outputs.skip_build.notEquals("true")
+    .and(conditions.status.always()),
   runsOn: "ubuntu-latest",
   steps: step({
     name: "Ensure CI success",

filename: .github/workflows/ci.yml
patch: @@ -5296,7 +5296,8 @@ jobs:
       - build-release-linux-aarch64
       - test-release-linux-aarch64
       - lint
-    if: always()
+      - pre_build
+    if: needs.pre_build.outputs.skip_build != 'true' && always()
     runs-on: ubuntu-latest
     steps:
       - name: Ensure CI success
Repository: nodejs/node
Pull request: lib: use primordial

this PR replaces spread operator with priordial in child_process.js

I added benchmark result without changes in fork. 
Is it reasonable to regard this as acceptable?
<img width="915" height="621" alt="image" src="https://github.com/user-attachments/assets/b7730338-a673-442c-92ac-79b0ff4be1fb" />


<!--
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.
-->


Changed files:
filename: lib/child_process.js
patch: @@ -648,7 +648,8 @@ function normalizeSpawnArguments(file, args, options) {
         'DEP0190');
       emittedDEP0190Already = true;
     }
-    const command = ArrayPrototypeJoin([file, ...args], ' ');
+
+    const command = args.length > 0 ? `${file} ${ArrayPrototypeJoin(args, ' ')}` : file;
     // Set the shell, switches, and commands.
     if (process.platform === 'win32') {
       if (typeof options.shell === 'string')
Repository: ollama/ollama
Pull request: fix gpu_info_cuda.c compile warning

fix compile warning 
`gpu_info_cuda.c: In function ‘cuda_check_vram’:
gpu_info_cuda.c:158:20: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘long long unsigned int’`

Changed files:
filename: gpu/gpu_info_cuda.c
patch: @@ -155,8 +155,8 @@ void cuda_check_vram(cuda_handle_t h, mem_info_t *resp) {
       }
     }
 
-    LOG(h.verbose, "[%d] CUDA totalMem %ld\n", i, memInfo.total);
-    LOG(h.verbose, "[%d] CUDA usedMem %ld\n", i, memInfo.used);
+    LOG(h.verbose, "[%d] CUDA totalMem %llu\n", i, memInfo.total);
+    LOG(h.verbose, "[%d] CUDA usedMem %llu\n", i, memInfo.used);
 
     resp->total += memInfo.total;
     resp->free += memInfo.free;
Repository: huggingface/transformers
Pull request: Video processor accepts single frames on cuda

# What does this PR do?

Fixes https://github.com/huggingface/transformers/issues/40867 and allows input videos to be a "3D tensor on cuda device"

Changed files:
filename: src/transformers/video_utils.py
patch: @@ -196,7 +196,9 @@ def make_batched_videos(videos) -> list[Union[np.ndarray, "torch.Tensor", "URL",
         return convert_pil_frames_to_video([videos])
     # only one frame passed, thus we unsqueeze time dim
     elif is_valid_image(videos):
-        return [np.array(videos)[None, ...]]
+        if isinstance(videos, PIL.Image.Image):
+            videos = np.array(videos)
+        return [videos[None, ...]]
     elif not isinstance(videos, list):
         raise ValueError(
             f"Invalid video input. Expected either a list of video frames or an input of 4 or 5 dimensions, but got"

filename: tests/utils/test_video_utils.py
patch: @@ -122,7 +122,7 @@ def test_make_batched_videos_torch(self):
         torch_video = torch.from_numpy(video)
         videos_list = make_batched_videos(torch_video)
         self.assertIsInstance(videos_list, list)
-        self.assertIsInstance(videos_list[0], np.ndarray)
+        self.assertIsInstance(videos_list[0], torch.Tensor)
         self.assertEqual(videos_list[0].shape, (1, 16, 32, 3))
         self.assertTrue(np.array_equal(videos_list[0][0], video))
Repository: facebook/react
Pull request: [compiler][be] Promote destructured params to temporaries

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30344
* __->__ #30332
* #30331
* #30330
* #30329
* #30328

Addresses a follow-up from the previous PR. Destructured function params are currently not eagerly promoted to temporaries: we wait until PromotedUsedTemporaries. But params _always_ have to be named, so we can promote when constructing HIR.

Changed files:
filename: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/outlined-destructured-params.expect.md
patch: @@ -0,0 +1,65 @@
+
+## Input
+
+```javascript
+import { Stringify } from "shared-runtime";
+
+function Component(props) {
+  // test outlined functions with destructured parameters - the
+  // temporary for the destructured param must be promoted
+  return (
+    <>
+      {props.items.map(({ id, name }) => (
+        <Stringify key={id} name={name} />
+      ))}
+    </>
+  );
+}
+
+export const FIXTURE_ENTRYPOINT = {
+  fn: Component,
+  params: [{ items: [{ id: 1, name: "one" }] }],
+};
+
+```
+
+## Code
+
+```javascript
+import { c as _c } from "react/compiler-runtime";
+import { Stringify } from "shared-runtime";
+
+function Component(props) {
+  const $ = _c(4);
+  let t0;
+  if ($[0] !== props.items) {
+    t0 = props.items.map(_temp);
+    $[0] = props.items;
+    $[1] = t0;
+  } else {
+    t0 = $[1];
+  }
+  let t1;
+  if ($[2] !== t0) {
+    t1 = <>{t0}</>;
+    $[2] = t0;
+    $[3] = t1;
+  } else {
+    t1 = $[3];
+  }
+  return t1;
+}
+function _temp(t0) {
+  const { id, name } = t0;
+  return <Stringify key={id} name={name} />;
+}
+
+export const FIXTURE_ENTRYPOINT = {
+  fn: Component,
+  params: [{ items: [{ id: 1, name: "one" }] }],
+};
+
+```
+      
+### Eval output
+(kind: ok) <div>{"name":"one"}</div>
\ No newline at end of file

filename: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/outlined-destructured-params.js
patch: @@ -0,0 +1,18 @@
+import { Stringify } from "shared-runtime";
+
+function Component(props) {
+  // test outlined functions with destructured parameters - the
+  // temporary for the destructured param must be promoted
+  return (
+    <>
+      {props.items.map(({ id, name }) => (
+        <Stringify key={id} name={name} />
+      ))}
+    </>
+  );
+}
+
+export const FIXTURE_ENTRYPOINT = {
+  fn: Component,
+  params: [{ items: [{ id: 1, name: "one" }] }],
+};
Repository: denoland/deno
Pull request: fix(compile): use SHT_NOTE to prevent `strip` from removing deno compiler data

Fixes https://github.com/denoland/deno/issues/22556

> Data is stored in ELF notes using a section of type SHT_NOTE and a program
header of type PT_NOTE. The .note.sui section is placed inside a PT_LOAD
segment so it is mapped at runtime, while the PT_NOTE program header points
to the same mapped range. Existing ELF notes are preserved by appending the
new SUI note to the note segment data.
>
> At run-time, data is extracted from note segments in memory using
dl_iterate_phdr.

Ref https://github.com/denoland/sui/pull/58


Changed files:
filename: Cargo.lock
patch: @@ -6090,13 +6090,14 @@ dependencies = [
 
 [[package]]
 name = "libsui"
-version = "0.12.6"
+version = "0.13.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2b6d6bbf43ba95540d1681826c8d7acb9744708398463ccbcd3c3a5d04c2fdc"
+checksum = "4dd268ef2098e102e82c67d9de9076a2f1cef12ae284a7a35635ea30fa2dda9e"
 dependencies = [
  "editpe",
  "image",
  "libc",
+ "object",
  "sha2",
  "windows-sys 0.48.0",
  "zerocopy 0.7.32",
@@ -6783,6 +6784,9 @@ version = "0.36.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9"
 dependencies = [
+ "crc32fast",
+ "hashbrown 0.14.5",
+ "indexmap 2.9.0",
  "memchr",
 ]
 

filename: Cargo.toml
patch: @@ -328,7 +328,7 @@ dprint-plugin-markdown = "=0.20.0"
 dprint-plugin-typescript = "=0.95.15"
 env_logger = "=0.11.6"
 fancy-regex = "=0.14.0"
-libsui = "0.12.6"
+libsui = "0.13.0"
 malva = "=0.12.1"
 markup_fmt = "=0.22.0"
 open = "5.0.1"

filename: tests/specs/compile/linux_strip/__test__.jsonc
patch: @@ -0,0 +1,20 @@
+{
+  "if": "linux",
+  "tempDir": true,
+  "steps": [
+    {
+      "args": "compile --output main main.ts",
+      "output": "[WILDCARD]"
+    },
+    {
+      "commandName": "strip",
+      "args": ["./main"],
+      "output": ""
+    },
+    {
+      "commandName": "./main",
+      "args": [],
+      "output": "main.out"
+    }
+  ]
+}

filename: tests/specs/compile/linux_strip/main.out
patch: @@ -0,0 +1 @@
+stripped binary still works

filename: tests/specs/compile/linux_strip/main.ts
patch: @@ -0,0 +1 @@
+console.log("stripped binary still works");
Repository: ollama/ollama
Pull request: use `-trimpath` when building releases

Fixes https://github.com/ollama/ollama/issues/2958

Changed files:
filename: Dockerfile
patch: @@ -92,7 +92,7 @@ COPY --from=rocm-build-amd64 /go/src/github.com/jmorganca/ollama/llm/llama.cpp/b
 COPY --from=rocm-build-amd64 /go/src/github.com/jmorganca/ollama/dist/deps/ ./dist/deps/
 ARG GOFLAGS
 ARG CGO_CFLAGS
-RUN go build .
+RUN go build -trimpath .
 
 # Intermediate stage used for ./scripts/build_linux.sh
 FROM --platform=linux/arm64 cpu-build-arm64 AS build-arm64
@@ -103,7 +103,7 @@ COPY . .
 COPY --from=cuda-build-arm64 /go/src/github.com/jmorganca/ollama/llm/llama.cpp/build/linux/ llm/llama.cpp/build/linux/
 ARG GOFLAGS
 ARG CGO_CFLAGS
-RUN go build .
+RUN go build -trimpath .
 
 # Runtime stages
 FROM --platform=linux/amd64 ubuntu:22.04 as runtime-amd64

filename: scripts/build_darwin.sh
patch: @@ -10,8 +10,8 @@ mkdir -p dist
 for TARGETARCH in arm64 amd64; do
     rm -rf llm/llama.cpp/build
     GOOS=darwin GOARCH=$TARGETARCH go generate ./...
-    CGO_ENABLED=1 GOOS=darwin GOARCH=$TARGETARCH go build -o dist/ollama-darwin-$TARGETARCH
-    CGO_ENABLED=1 GOOS=darwin GOARCH=$TARGETARCH go build -cover -o dist/ollama-darwin-$TARGETARCH-cov
+    CGO_ENABLED=1 GOOS=darwin GOARCH=$TARGETARCH go build -trimpath -o dist/ollama-darwin-$TARGETARCH
+    CGO_ENABLED=1 GOOS=darwin GOARCH=$TARGETARCH go build -trimpath -cover -o dist/ollama-darwin-$TARGETARCH-cov
 done
 
 lipo -create -output dist/ollama dist/ollama-darwin-arm64 dist/ollama-darwin-amd64

filename: scripts/build_windows.ps1
patch: @@ -53,7 +53,7 @@ function buildOllama() {
     write-host "Building ollama CLI"
     & go generate ./...
     if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)}
-    & go build -ldflags "-s -w -X=github.com/jmorganca/ollama/version.Version=$script:VERSION -X=github.com/jmorganca/ollama/server.mode=release" .
+    & go build -trimpath -ldflags "-s -w -X=github.com/jmorganca/ollama/version.Version=$script:VERSION -X=github.com/jmorganca/ollama/server.mode=release" .
     if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)}
     if ("${env:KEY_CONTAINER}") {
         & "${script:SignTool}" sign /v /fd sha256 /t http://timestamp.digicert.com /f "${script:OLLAMA_CERT}" `
@@ -68,7 +68,7 @@ function buildApp() {
     write-host "Building Ollama App"
     cd "${script:SRC_DIR}\app"
     & windres -l 0 -o ollama.syso ollama.rc
-    & go build -ldflags "-s -w -H windowsgui -X=github.com/jmorganca/ollama/version.Version=$script:VERSION -X=github.com/jmorganca/ollama/server.mode=release" .
+    & go build -trimpath -ldflags "-s -w -H windowsgui -X=github.com/jmorganca/ollama/version.Version=$script:VERSION -X=github.com/jmorganca/ollama/server.mode=release" .
     if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)}
     if ("${env:KEY_CONTAINER}") {
         & "${script:SignTool}" sign /v /fd sha256 /t http://timestamp.digicert.com /f "${script:OLLAMA_CERT}" `
Repository: facebook/react
Pull request: fix(compiler): Align return types of `ErrImp<E>` and `OkImpl<T>` with `Result<T, E>` for TS 5.5

## Summary
`Result<T, E>` defines `isOk` and `isErr` as type predicates:
```ts
  // Returns `true` if the result is `Ok`.
  isOk(): this is OkImpl<T>;
  // Returns `true` if the result is `Err`.
  isErr(): this is ErrImpl<E>;
```

The implementations just return `boolean`, which seems to break in TS 5.5:

Running `tsc` in current `main`:
```
tsc
src/Utils/Result.ts:202:3 - error TS2416: Property 'isOk' in type 'ErrImpl<E>' is not assignable to the same property in base type 'Result<never, E>'.
  Type '() => boolean' is not assignable to type '() => this is OkImpl<never>'.
    Signature '(): boolean' must be a type predicate.

202   isOk(): boolean {
      ~~~~

src/Utils/Result.ts:206:3 - error TS2416: Property 'isErr' in type 'ErrImpl<E>' is not assignable to the same property in base type 'Result<never, E>'.
  Type '() => boolean' is not assignable to type '() => this is ErrImpl<E>'.
    Signature '(): boolean' must be a type predicate.

206   isErr(): boolean {


Found 38 errors in 7 files.

Errors  Files
     2  src/HIR/BuildHIR.ts:196
     2  src/HIR/Environment.ts:745
     2  src/ReactiveScopes/CodegenReactiveFunction.ts:290
    14  src/Utils/Result.ts:96
     2  src/Validation/ValidateNoRefAccesInRender.ts:201
     2  src/Validation/ValidateNoSetStateInRender.ts:115
    14  src/__tests__/Result-test.ts:13
```

## How did you test this change?
```sh
tsc
# no errors
tsc --version
Version 5.5.3
```


Changed files:
filename: compiler/packages/babel-plugin-react-compiler/src/Utils/Result.ts
patch: @@ -124,11 +124,11 @@ class OkImpl<T> implements Result<T, never> {
     return this;
   }
 
-  isOk(): boolean {
+  isOk(): this is OkImpl<T> {
     return true;
   }
 
-  isErr(): boolean {
+  isErr(): this is ErrImpl<never> {
     return false;
   }
 
@@ -199,11 +199,11 @@ class ErrImpl<E> implements Result<never, E> {
     return fn(this.val);
   }
 
-  isOk(): boolean {
+  isOk(): this is OkImpl<never> {
     return false;
   }
 
-  isErr(): boolean {
+  isErr(): this is ErrImpl<E> {
     return true;
   }
Repository: ollama/ollama
Pull request: convert: fix shape

This commit reverts 18979ad4a1d40d04e3b981a477fa6323a40304b6 which was merged in #3014

#3014 broke convert by setting dimensions to an array filled with 1s which is incorrect. while this is how the reader works, the writer only writes the array items if it's greater than zero[^1]. filling with 1s incorrectly potentially adds extra dimensions

the root cause is the way dimensions are encoded. using a slice is less error prone

[^1]: https://github.com/ollama/ollama/blob/main/llm/gguf.go#L427

Changed files:
filename: convert/convert.go
patch: @@ -103,9 +103,9 @@ func ReadSafeTensors(fn string, offset uint64) ([]llm.Tensor, uint64, error) {
 			return []llm.Tensor{}, 0, err
 		}
 
-		shape := [4]uint64{1, 1, 1, 1}
-		for cnt, s := range data.Shape {
-			shape[cnt] = uint64(s)
+		shape := []uint64{0, 0, 0, 0}
+		for i := range data.Shape {
+			shape[i] = uint64(data.Shape[i])
 		}
 
 		t := llm.Tensor{
Repository: ggml-org/llama.cpp
Pull request: fix: Viewing multiple PDF attachments

Close #16947

Changed files:
filename: tools/server/webui/src/lib/components/app/chat/ChatAttachments/ChatAttachmentPreviewDialog.svelte
patch: @@ -134,6 +134,15 @@
 		}
 	}
 
+	$effect(() => {
+		if (open) {
+			pdfImages = [];
+			pdfImagesLoading = false;
+			pdfImagesError = null;
+			pdfViewMode = 'pages';
+		}
+	});
+
 	$effect(() => {
 		if (open && isPdf && pdfViewMode === 'pages') {
 			loadPdfImages();
Repository: ollama/ollama
Pull request: Avoid rocm runner and dependency clash

Putting the rocm symlink next to the runners is risky.  This moves the payloads into a subdir to avoid potential clashes.

Fixes #3035 

Untested at the moment...

Changed files:
filename: gpu/amd_linux.go
patch: @@ -282,7 +282,7 @@ func AMDValidateLibDir() (string, error) {
 	}
 
 	// If we already have a rocm dependency wired, nothing more to do
-	rocmTargetDir := filepath.Join(payloadsDir, "rocm")
+	rocmTargetDir := filepath.Clean(filepath.Join(payloadsDir, "..", "rocm"))
 	if rocmLibUsable(rocmTargetDir) {
 		return rocmTargetDir, nil
 	}

filename: gpu/assets.go
patch: @@ -23,7 +23,9 @@ func PayloadsDir() (string, error) {
 		if err != nil {
 			return "", fmt.Errorf("failed to generate tmp dir: %w", err)
 		}
-		payloadsDir = tmpDir
+		// We create a distinct subdirectory for payloads within the tmpdir
+		// This will typically look like /tmp/ollama3208993108/runners on linux
+		payloadsDir = filepath.Join(tmpDir, "runners")
 	}
 	return payloadsDir, nil
 }
@@ -32,10 +34,12 @@ func Cleanup() {
 	lock.Lock()
 	defer lock.Unlock()
 	if payloadsDir != "" {
-		slog.Debug("cleaning up", "dir", payloadsDir)
-		err := os.RemoveAll(payloadsDir)
+		// We want to fully clean up the tmpdir parent of the payloads dir
+		tmpDir := filepath.Clean(filepath.Join(payloadsDir, ".."))
+		slog.Debug("cleaning up", "dir", tmpDir)
+		err := os.RemoveAll(tmpDir)
 		if err != nil {
-			slog.Warn("failed to clean up", "dir", payloadsDir, "err", err)
+			slog.Warn("failed to clean up", "dir", tmpDir, "err", err)
 		}
 	}
 }

filename: llm/generate/gen_linux.sh
patch: @@ -185,7 +185,7 @@ if [ -d "${ROCM_PATH}" ]; then
     init_vars
     CMAKE_DEFS="${COMMON_CMAKE_DEFS} ${CMAKE_DEFS} -DLLAMA_HIPBLAS=on -DCMAKE_C_COMPILER=$ROCM_PATH/llvm/bin/clang -DCMAKE_CXX_COMPILER=$ROCM_PATH/llvm/bin/clang++ -DAMDGPU_TARGETS=$(amdGPUs) -DGPU_TARGETS=$(amdGPUs)"
     BUILD_DIR="${LLAMACPP_DIR}/build/linux/${ARCH}/rocm${ROCM_VARIANT}"
-    EXTRA_LIBS="-L${ROCM_PATH}/lib -L/opt/amdgpu/lib/x86_64-linux-gnu/ -Wl,-rpath,\$ORIGIN/../rocm/ -lhipblas -lrocblas -lamdhip64 -lrocsolver -lamd_comgr -lhsa-runtime64 -lrocsparse -ldrm -ldrm_amdgpu"
+    EXTRA_LIBS="-L${ROCM_PATH}/lib -L/opt/amdgpu/lib/x86_64-linux-gnu/ -Wl,-rpath,\$ORIGIN/../../rocm/ -lhipblas -lrocblas -lamdhip64 -lrocsolver -lamd_comgr -lhsa-runtime64 -lrocsparse -ldrm -ldrm_amdgpu"
     build
 
     # Record the ROCM dependencies