[PR #14690] [CLOSED] ml: rename SSMScan parameter C to CM to resolve cgo naming conflict #25328

Closed
opened 2026-04-19 18:09:18 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/14690
Author: @nodcat
Created: 3/7/2026
Status: Closed

Base: mainHead: main


📝 Commits (6)

  • 8dfb5ef ml/backend/ggml: rename SSMScan parameter C to CM to resolve cgo naming conflict
  • 684caec Merge branch 'ollama:main' into main
  • 6bbbdbb Merge branch 'ollama:main' into main
  • c1b41e4 Merge branch 'ollama:main' into main
  • 00b562d Merge branch 'ollama:main' into main
  • 98af055 Merge branch 'ollama:main' into main

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 ml/backend/ggml/ggml.go (+2 -2)

📄 Description

What is this change?

Rename the C parameter of the Tensor.SSMScan method to CM to resolve the naming conflict with the import alias C (which causes compilation confusion and readability issues).

Why is this change needed?

The original parameter name C collides with the import alias C used to call ggml_ssm_scan, leading to potential code ambiguity and making it harder to maintain the SSMScan method. Renaming to CM eliminates this conflict while keeping the parameter's semantic meaning (it still refers to the SSM matrix C in the ggml_ssm_scan call).

import "C"

func (t *Tensor) SSMScan(ctx ml.Context, x, dt, A, B, CM, ids ml.Tensor) ml.Tensor {
	return &Tensor{
		b: t.b,
		t: C.ggml_ssm_scan(ctx.(*Context).ctx, t.t, x.(*Tensor).t, dt.(*Tensor).t, A.(*Tensor).t, B.(*Tensor).t, CM.(*Tensor).t, ids.(*Tensor).t),
	}
}


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/14690 **Author:** [@nodcat](https://github.com/nodcat) **Created:** 3/7/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (6) - [`8dfb5ef`](https://github.com/ollama/ollama/commit/8dfb5ef97fc7fda7b3c4bb91a437c26bed4eb3e2) ml/backend/ggml: rename SSMScan parameter C to CM to resolve cgo naming conflict - [`684caec`](https://github.com/ollama/ollama/commit/684caeccb1dc16546b57719910bdee3925da91ca) Merge branch 'ollama:main' into main - [`6bbbdbb`](https://github.com/ollama/ollama/commit/6bbbdbb2e1d6718fe6bc991d624b3205b4ff8753) Merge branch 'ollama:main' into main - [`c1b41e4`](https://github.com/ollama/ollama/commit/c1b41e422bb4d88d56a21b9613c0cf2cfdd11528) Merge branch 'ollama:main' into main - [`00b562d`](https://github.com/ollama/ollama/commit/00b562df07d32a06318c6ac8a6e7e18a3fee555b) Merge branch 'ollama:main' into main - [`98af055`](https://github.com/ollama/ollama/commit/98af05591b4b97189078f01f79fdbf525003c281) Merge branch 'ollama:main' into main ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `ml/backend/ggml/ggml.go` (+2 -2) </details> ### 📄 Description ## What is this change? Rename the `C` parameter of the `Tensor.SSMScan` method to `CM` to resolve the naming conflict with the import alias `C` (which causes compilation confusion and readability issues). ## Why is this change needed? The original parameter name `C` collides with the import alias `C` used to call `ggml_ssm_scan`, leading to potential code ambiguity and making it harder to maintain the SSMScan method. Renaming to `CM` eliminates this conflict while keeping the parameter's semantic meaning (it still refers to the SSM matrix C in the ggml_ssm_scan call). ```go import "C" func (t *Tensor) SSMScan(ctx ml.Context, x, dt, A, B, CM, ids ml.Tensor) ml.Tensor { return &Tensor{ b: t.b, t: C.ggml_ssm_scan(ctx.(*Context).ctx, t.t, x.(*Tensor).t, dt.(*Tensor).t, A.(*Tensor).t, B.(*Tensor).t, CM.(*Tensor).t, ids.(*Tensor).t), } } ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-19 18:09:18 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#25328