helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: [ez] Rewrite optional chaining and nullish coalescing syntax

Rewrite `containerInfo?.ownerDocument?.defaultView ?? window` to instead use a ternary.

This changes the compilation output (see [bundle changes from #30951](https://github.com/facebook/react/commit/d65fb06955e9f32e6a40d1c7177d77893dff95b9)).
```js
// compilation of containerInfo?.ownerDocument?.defaultView ?? window
var $jscomp$optchain$tmpm1756096108$1, $jscomp$nullish$tmp0;
containerInfo =
  null !=
  ($jscomp$nullish$tmp0 =
    null == containerInfo
      ? void 0
      : null ==
          ($jscomp$optchain$tmpm1756096108$1 = containerInfo.ownerDocument)
        ? void 0
        : $jscomp$optchain$tmpm1756096108$1.defaultView)
    ? $jscomp$nullish$tmp0
    : window;

// compilation of ternary expression
containerInfo =
  null != containerInfo &&
  null != containerInfo.ownerDocument &&
  null != containerInfo.ownerDocument.defaultView
    ? containerInfo.ownerDocument.defaultView
    : window;
```

This also reduces the number of no-op bundle syncs for Meta. Note that Closure compiler's `jscomp$optchain$tmp<HASH>` identifiers change when we rebuild (likely due to version number changes). See [workflow](https://github.com/facebook/react/actions/runs/10891164281/job/30221518374) for a PR that was synced despite making no changes to the runtime.

Changed files:
filename: packages/react-dom-bindings/src/client/ReactInputSelection.js
patch: @@ -57,7 +57,12 @@ function isSameOriginFrame(iframe) {
 }
 
 function getActiveElementDeep(containerInfo) {
-  let win = containerInfo?.ownerDocument?.defaultView ?? window;
+  let win =
+    containerInfo != null &&
+    containerInfo.ownerDocument != null &&
+    containerInfo.ownerDocument.defaultView != null
+      ? containerInfo.ownerDocument.defaultView
+      : window;
   let element = getActiveElement(win.document);
   while (element instanceof win.HTMLIFrameElement) {
     if (isSameOriginFrame(element)) {
Repository: ollama/ollama
Pull request: Use `--quantize` flag and `quantize` api parameter


Changed files:
filename: api/types.go
patch: @@ -197,14 +197,17 @@ type EmbeddingResponse struct {
 
 // CreateRequest is the request passed to [Client.Create].
 type CreateRequest struct {
-	Model        string `json:"model"`
-	Path         string `json:"path"`
-	Modelfile    string `json:"modelfile"`
-	Stream       *bool  `json:"stream,omitempty"`
-	Quantization string `json:"quantization,omitempty"`
+	Model     string `json:"model"`
+	Path      string `json:"path"`
+	Modelfile string `json:"modelfile"`
+	Stream    *bool  `json:"stream,omitempty"`
+	Quantize  string `json:"quantize,omitempty"`
 
 	// Name is deprecated, see Model
 	Name string `json:"name"`
+
+	// Quantization is deprecated, see Quantize
+	Quantization string `json:"quantization,omitempty"`
 }
 
 // DeleteRequest is the request passed to [Client.Delete].

filename: cmd/cmd.go
patch: @@ -142,9 +142,9 @@ func CreateHandler(cmd *cobra.Command, args []string) error {
 		return nil
 	}
 
-	quantization, _ := cmd.Flags().GetString("quantization")
+	quantize, _ := cmd.Flags().GetString("quantize")
 
-	request := api.CreateRequest{Name: args[0], Modelfile: modelfile.String(), Quantization: quantization}
+	request := api.CreateRequest{Name: args[0], Modelfile: modelfile.String(), Quantize: quantize}
 	if err := client.Create(cmd.Context(), &request, fn); err != nil {
 		return err
 	}
@@ -1051,7 +1051,7 @@ func NewCLI() *cobra.Command {
 	}
 
 	createCmd.Flags().StringP("file", "f", "Modelfile", "Name of the Modelfile (default \"Modelfile\")")
-	createCmd.Flags().StringP("quantization", "q", "", "Quantization level.")
+	createCmd.Flags().StringP("quantize", "q", "", "Quantize model to this level (e.g. q4_0)")
 
 	showCmd := &cobra.Command{
 		Use:     "show MODEL",

filename: server/routes.go
patch: @@ -554,7 +554,12 @@ func (s *Server) CreateModelHandler(c *gin.Context) {
 		ctx, cancel := context.WithCancel(c.Request.Context())
 		defer cancel()
 
-		if err := CreateModel(ctx, name.String(), filepath.Dir(req.Path), strings.ToUpper(req.Quantization), modelfile, fn); err != nil {
+		quantization := req.Quantization
+		if req.Quantize != "" {
+			quantization = req.Quantize
+		}
+
+		if err := CreateModel(ctx, name.String(), filepath.Dir(req.Path), strings.ToUpper(quantization), modelfile, fn); err != nil {
 			ch <- gin.H{"error": err.Error()}
 		}
 	}()
Repository: huggingface/transformers
Pull request: [quantization] fix compressed_tensors tests

# What does this PR do?

Fixing compressed_tensors related tests. Failling tests are passing locally

Changed files:
filename: tests/quantization/compressed_tensors_integration/test_compressed_models.py
patch: @@ -85,7 +85,11 @@ def _has_nested_attr(obj, attr_path):
                             )
                         else:
                             self.assertTrue(
-                                torch.allclose(submodule.weight, comp_decomp_obj.weight, atol=0.2),
+                                torch.allclose(
+                                    submodule.weight.to(torch_device),
+                                    comp_decomp_obj.weight.to(torch_device),
+                                    atol=0.2,
+                                ),
                                 f"Weight mismatch for module '{name}' in quantized-only or stacked model.",
                             )
 

filename: tests/quantization/compressed_tensors_integration/test_compressed_tensors.py
patch: @@ -47,7 +47,7 @@ def test_config_to_from_dict(self):
         self.assertIsInstance(config_from_dict.sparsity_config, SparsityCompressionConfig)
 
     def test_tinyllama_w8a8(self):
-        expected_out = "
 Paris is the capital of which country?\n\n  1. Paris is the capital of which country?\n\n  1. Paris is the capital of which country?\n\n  1. Paris is the capital of which country?\n\n"
+        expected_out = "
 Paris is the capital of which country?\n\n**A) 10** Paris is the capital of which country?\n\n**B) 11** Paris is the capital of which country?\n\n**C) 1"
         self._test_quantized_model(self.tinyllama_w8a8, expected_out)
 
     def test_tinyllama_w4a16(self):
@@ -59,7 +59,7 @@ def test_tinyllama_w8a16(self):
         self._test_quantized_model(self.tinyllama_w8a16, expected_out)
 
     def test_llama_8b_fp8(self):
-        expected_out = "
Paris is the capital of which country? France\nWhat is the name of the famous museum in Paris that is home to the Mona Lisa? The Louvre\nWhat is the name of the famous bridge in Paris that is often associated with the city"
+        expected_out = "
Paris is the capital of which country? France\nWhat is the name of the famous art museum in Paris? The Louvre\nWhat is the name of the famous opera house in Paris? Palais Garnier\nWhat is the name of the"
         self._test_quantized_model(self.llama3_8b_fp8, expected_out)
 
     def _test_quantized_model(self, model_name: str, expected_output: str):
Repository: nodejs/node
Pull request: deps: update amaro to 0.5.2

This is an automated update of amaro to 0.5.2.

Fixes: https://github.com/nodejs/node/issues/57471

Changed files:
filename: deps/amaro/dist/package.json
patch: @@ -4,7 +4,7 @@
     "강동윤 <kdy1997.dev@gmail.com>"
   ],
   "description": "wasm module for swc",
-  "version": "1.11.15",
+  "version": "1.11.21",
   "license": "Apache-2.0",
   "repository": {
     "type": "git",

filename: deps/amaro/package.json
patch: @@ -1,6 +1,6 @@
 {
 	"name": "amaro",
-	"version": "0.5.1",
+	"version": "0.5.2",
 	"description": "Node.js TypeScript wrapper",
 	"license": "MIT",
 	"type": "commonjs",

filename: src/amaro_version.h
patch: @@ -2,5 +2,5 @@
 // Refer to tools/dep_updaters/update-amaro.sh
 #ifndef SRC_AMARO_VERSION_H_
 #define SRC_AMARO_VERSION_H_
-#define AMARO_VERSION "0.5.1"
+#define AMARO_VERSION "0.5.2"
 #endif  // SRC_AMARO_VERSION_H_
Repository: electron/electron
Pull request: fix: titlebar showing in content protected window

#### Description of Change

Closes https://github.com/electron/electron/issues/47152.

Fixes an issue where protected transparent windows will show a titlebar after visibility change. This happened because `SetWindowDisplayAffinity` will attempt to compose the window when hidden and re-shown.

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd
- [x] `npm test` passes
- [x] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: Fixed an issue where protected transparent windows inappropriately showed a titlebar after visibility change.


Changed files:
filename: shell/browser/ui/win/electron_desktop_window_tree_host_win.cc
patch: @@ -143,11 +143,33 @@ bool ElectronDesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) {
 void ElectronDesktopWindowTreeHostWin::HandleVisibilityChanged(bool visible) {
   if (native_window_view_->widget())
     native_window_view_->widget()->OnNativeWidgetVisibilityChanged(visible);
+
+  if (visible)
+    UpdateAllowScreenshots();
 }
 
 void ElectronDesktopWindowTreeHostWin::SetAllowScreenshots(bool allow) {
-  ::SetWindowDisplayAffinity(GetAcceleratedWidget(),
-                             allow ? WDA_NONE : WDA_EXCLUDEFROMCAPTURE);
+  if (allow_screenshots_ == allow)
+    return;
+
+  allow_screenshots_ = allow;
+
+  // If the window is not visible, do not set the window display affinity
+  // because `SetWindowDisplayAffinity` will attempt to compose the window,
+  if (!IsVisible())
+    return;
+
+  UpdateAllowScreenshots();
+}
+
+void ElectronDesktopWindowTreeHostWin::UpdateAllowScreenshots() {
+  bool allowed = views::DesktopWindowTreeHostWin::AreScreenshotsAllowed();
+  if (allowed == allow_screenshots_)
+    return;
+
+  ::SetWindowDisplayAffinity(
+      GetAcceleratedWidget(),
+      allow_screenshots_ ? WDA_NONE : WDA_EXCLUDEFROMCAPTURE);
 }
 
 void ElectronDesktopWindowTreeHostWin::OnNativeThemeUpdated(

filename: shell/browser/ui/win/electron_desktop_window_tree_host_win.h
patch: @@ -52,8 +52,11 @@ class ElectronDesktopWindowTreeHostWin : public views::DesktopWindowTreeHostWin,
   bool ShouldWindowContentsBeTransparent() const override;
 
  private:
+  void UpdateAllowScreenshots();
+
   raw_ptr<NativeWindowViews> native_window_view_;  // weak ref
   std::optional<bool> force_should_paint_as_active_;
+  bool allow_screenshots_ = true;
   bool widget_init_done_ = false;
 };
Repository: electron/electron
Pull request: fix: window `accentColor` should adhere to native window behavior

Backport of #47740

See that PR for details.


Notes: Fixes an issue where the accent border was drawn on all windows regardless of the window's active focused status.

Changed files:
filename: shell/browser/native_window_views.cc
patch: @@ -422,8 +422,6 @@ NativeWindowViews::NativeWindowViews(const gin_helper::Dictionary& options,
     last_window_state_ = ui::mojom::WindowShowState::kFullscreen;
   else
     last_window_state_ = ui::mojom::WindowShowState::kNormal;
-
-  UpdateWindowAccentColor();
 #endif
 
   // Listen to mouse events.
@@ -1746,6 +1744,12 @@ void NativeWindowViews::OnWidgetActivationChanged(views::Widget* changed_widget,
     NativeWindow::NotifyWindowBlur();
   }
 
+#if BUILDFLAG(IS_WIN)
+  // Update accent color based on activation state when no explicit color is
+  // set.
+  UpdateWindowAccentColor(active);
+#endif
+
   // Hide menu bar when window is blurred.
   if (!active && IsMenuBarAutoHide() && IsMenuBarVisible())
     SetMenuBarVisibility(false);

filename: shell/browser/native_window_views.h
patch: @@ -222,7 +222,7 @@ class NativeWindowViews : public NativeWindow,
   void ResetWindowControls();
   void SetRoundedCorners(bool rounded);
   void SetForwardMouseMessages(bool forward);
-  void UpdateWindowAccentColor();
+  void UpdateWindowAccentColor(bool active);
   static LRESULT CALLBACK SubclassProc(HWND hwnd,
                                        UINT msg,
                                        WPARAM w_param,

filename: shell/browser/native_window_views_win.cc
patch: @@ -499,15 +499,15 @@ bool NativeWindowViews::PreHandleMSG(UINT message,
       return false;
     }
     case WM_DWMCOLORIZATIONCOLORCHANGED: {
-      UpdateWindowAccentColor();
+      UpdateWindowAccentColor(IsActive());
       return false;
     }
     case WM_SETTINGCHANGE: {
       if (l_param) {
         const wchar_t* setting_name = reinterpret_cast<const wchar_t*>(l_param);
         std::wstring setting_str(setting_name);
         if (setting_str == L"ImmersiveColorSet")
-          UpdateWindowAccentColor();
+          UpdateWindowAccentColor(IsActive());
       }
       return false;
     }
@@ -570,7 +570,7 @@ void NativeWindowViews::HandleSizeEvent(WPARAM w_param, LPARAM l_param) {
   }
 }
 
-void NativeWindowViews::UpdateWindowAccentColor() {
+void NativeWindowViews::UpdateWindowAccentColor(bool active) {
   if (base::win::GetVersion() < base::win::Version::WIN11)
     return;
 
@@ -589,7 +589,7 @@ void NativeWindowViews::UpdateWindowAccentColor() {
     should_apply_accent = std::get<bool>(accent_color_);
   } else if (std::holds_alternative<std::monostate>(accent_color_)) {
     // If no explicit color was set, default to the system accent color.
-    should_apply_accent = IsAccentColorOnTitleBarsEnabled();
+    should_apply_accent = IsAccentColorOnTitleBarsEnabled() && active;
   }
 
   // Use system accent color as fallback if no explicit color was set.
Repository: ollama/ollama
Pull request: add phi2 mem


Changed files:
filename: llm/ggml.go
patch: @@ -329,7 +329,10 @@ func (llm GGML) GraphSize(context, batch uint64) (partialOffload, fullOffload ui
 			4*batch*(1+4*embedding+context+context*heads),
 		)
 
-		partialOffload = 4*batch*(2*embedding+vocab) + embedding*vocab*105/128
+		partialOffload = max(
+			4*batch*(2*embedding+vocab)+embedding*vocab*105/128,
+			4*batch*(2+3*embedding+context+context*heads),
+		)
 	case "stablelm":
 		fullOffload = 4 * batch * (context*(1+heads) + 3*embedding + 2)
 		partialOffload = max(
Repository: huggingface/transformers
Pull request: fix: Gemma 3 weights conversion vision and multimodal projector paths

# What does this PR do?

Fixes bugs in the Gemma 3 weights conversion script:

* Looking for multi-modal projector weights at the wrong location
* Had the wrong prefix on the vision model weights


## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [x] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [x] Did you write any new necessary tests?


## Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@zucchini-nlp


Changed files:
filename: src/transformers/models/gemma3/convert_gemma3_weights.py
patch: @@ -447,7 +447,7 @@ def convert_transformer_weights(
             return zip([], [])
         else:
             raise ValueError(f"Unexpected member, {prop}, in Embedder.")
-    elif path.startswith(f"{_TRANSFORMER_EMBEDDER}/mm"):
+    elif f"{_TRANSFORMER_EMBEDDER}/mm_" in path:
         if not _INCLUDE_VISION_ENCODER.value:
             return zip([], [])
 
@@ -553,7 +553,7 @@ def update_tree(path: str, weights: np.ndarray, target_dtype: torch.dtype) -> No
                 continue
 
             path, weights = convert_siglip_weight(config=config.vision_config, paths=paths, weights=value)
-            update_tree(path, weights, config.vision_config.dtype)
+            update_tree(f"model.{path}", weights, config.vision_config.dtype)
         else:
             for path, weights in convert_transformer_weights(config=config.text_config, paths=paths, weights=value):
                 if not _INCLUDE_VISION_ENCODER.value:
Repository: ollama/ollama
Pull request: Don't clamp ctx size in `PredictServerFit`


Changed files:
filename: llm/memory.go
patch: @@ -12,17 +12,8 @@ import (
 
 // This algorithm looks for a complete fit to determine if we need to unload other models
 func PredictServerFit(allGpus gpu.GpuInfoList, ggml *GGML, adapters, projectors []string, opts api.Options) (bool, uint64) {
-	var estimatedVRAM uint64
-	if opts.NumCtx > int(ggml.KV().ContextLength()) {
-		slog.Warn("requested context length is greater than model max context length", "requested", opts.NumCtx, "model", ggml.KV().ContextLength())
-		opts.NumCtx = int(ggml.KV().ContextLength())
-	}
-
-	if opts.NumCtx < 4 {
-		opts.NumCtx = 4
-	}
-
 	// Split up the GPUs by type and try them
+	var estimatedVRAM uint64
 	for _, gpus := range allGpus.ByLibrary() {
 		var layerCount int
 		layerCount, estimatedVRAM, _ = EstimateGPULayers(gpus, ggml, projectors, opts)

filename: llm/server.go
patch: @@ -77,15 +77,7 @@ func LoadModel(model string) (*GGML, error) {
 // The gpu list must be a single family.
 func NewLlamaServer(gpus gpu.GpuInfoList, model string, ggml *GGML, adapters, projectors []string, opts api.Options) (LlamaServer, error) {
 	var err error
-	if opts.NumCtx > int(ggml.KV().ContextLength()) {
-		slog.Warn("requested context length is greater than the model's training context window size", "requested", opts.NumCtx, "training size", ggml.KV().ContextLength())
-	}
-
-	if opts.NumCtx < 4 {
-		opts.NumCtx = 4
-	}
-
-	cpuRunner := ""
+	var cpuRunner string
 	var estimatedVRAM uint64
 	var estimatedTotal uint64
 	var systemMemory uint64

filename: server/sched.go
patch: @@ -61,6 +61,10 @@ func InitScheduler(ctx context.Context) *Scheduler {
 // context must be canceled to decrement ref count and release the runner
 func (s *Scheduler) GetRunner(c context.Context, model *Model, opts api.Options, sessionDuration time.Duration) (chan *runnerRef, chan error) {
 	// allocate a large enough kv cache for all parallel requests
+	if opts.NumCtx < 4 {
+		opts.NumCtx = 4
+	}
+
 	opts.NumCtx = opts.NumCtx * envconfig.NumParallel
 
 	req := &LlmRequest{
Repository: ggml-org/llama.cpp
Pull request: fix UMA detection on discrete GPUs.

Fixes #17536

Submitted as a draft for now as I do not have a Spark to hand to confirm ``cudaGetDeviceProperties``. I wrote a small CUDA to confirm that ``prop.unifiedAddressing == 1`` on my discrete GPUs. This means it cannot be used to check if the device is a DGX Spark. 

https://developer.download.nvidia.com/compute/DevZone/docs/html/C/doc/html/group__CUDART__DEVICE_g5aa4f47938af8276f08074d09b7d520c.html -- these docs seem to suggest that this should be ``prop.integrated`` instead? This flag is 0 on my discrete GPUs.

Changed files:
filename: ggml/src/ggml-cuda/ggml-cuda.cu
patch: @@ -3837,7 +3837,7 @@ static void ggml_backend_cuda_device_get_memory(ggml_backend_dev_t dev, size_t *
 
     // Check if UMA is explicitly enabled via environment variable
     bool uma_env = getenv("GGML_CUDA_ENABLE_UNIFIED_MEMORY") != nullptr;
-    bool is_uma = prop.unifiedAddressing > 0 || uma_env;
+    bool is_uma = prop.integrated > 0 || uma_env;
 
     if (is_uma) {
         // For UMA systems (like DGX Spark), use system memory info
Repository: ggml-org/llama.cpp
Pull request: ggml-cuda: fix blackwell native builds

Replace 12x in native architectures by 12xa


Changed files:
filename: ggml/src/ggml-cuda/CMakeLists.txt
patch: @@ -35,16 +35,33 @@ if (CUDAToolkit_FOUND)
             if (CUDAToolkit_VERSION VERSION_GREATER_EQUAL "11.8")
                 list(APPEND CMAKE_CUDA_ARCHITECTURES 89-real)
             endif()
-
-            if (CUDAToolkit_VERSION VERSION_GREATER_EQUAL "12.8")
-                list(APPEND CMAKE_CUDA_ARCHITECTURES 120f-virtual)
-            endif()
         endif()
     endif()
     message(STATUS "Using CUDA architectures: ${CMAKE_CUDA_ARCHITECTURES}")
 
     enable_language(CUDA)
 
+    # Replace any 12x-real architectures with 12x{a}-real. FP4 ptx instructions are not available in just 12x
+    if (GGML_NATIVE)
+        set(PROCESSED_ARCHITECTURES "")
+        foreach(ARCH ${CMAKE_CUDA_ARCHITECTURES_NATIVE})
+            if(ARCH MATCHES "^12[0-9]$")
+                string(REGEX REPLACE "^(12[0-9]).*$" "\\1" BASE_ARCH ${ARCH})
+                message(STATUS "Replacing ${ARCH} with ${BASE_ARCH}a-real")
+                list(APPEND PROCESSED_ARCHITECTURES "${BASE_ARCH}a-real")
+            else()
+                list(APPEND PROCESSED_ARCHITECTURES ${ARCH})
+            endif()
+        endforeach()
+        set(CMAKE_CUDA_ARCHITECTURES ${PROCESSED_ARCHITECTURES})
+    else()
+        foreach(ARCH ${CMAKE_CUDA_ARCHITECTURES})
+            if(ARCH MATCHES "^12[0-9]$")
+                message(FATAL_ERROR "Compute capability ${ARCH} used, use ${ARCH}a or ${ARCH}f for Blackwell specific optimizations")
+            endif()
+        endforeach()
+    endif()
+
     file(GLOB   GGML_HEADERS_CUDA "*.cuh")
     list(APPEND GGML_HEADERS_CUDA "../../include/ggml-cuda.h")
Repository: ollama/ollama
Pull request: Bump VRAM buffer back up

Under stress scenarios we're seeing OOMs so this should help stabilize the allocations under heavy concurrency stress.

Changed files:
filename: gpu/gpu.go
patch: @@ -31,8 +31,8 @@ type handles struct {
 }
 
 const (
-	cudaMinimumMemory = 256 * format.MebiByte
-	rocmMinimumMemory = 256 * format.MebiByte
+	cudaMinimumMemory = 457 * format.MebiByte
+	rocmMinimumMemory = 457 * format.MebiByte
 )
 
 var gpuMutex sync.Mutex

filename: gpu/gpu_darwin.go
patch: @@ -15,7 +15,7 @@ import (
 )
 
 const (
-	metalMinimumMemory = 384 * format.MebiByte
+	metalMinimumMemory = 512 * format.MebiByte
 )
 
 func GetGPUInfo() GpuInfoList {
Repository: ggml-org/llama.cpp
Pull request: Revert "ggml-cuda: use CMAKE_CUDA_ARCHITECTURES if set when GGML_NATI…

…VE=ON (#18413)"

This reverts commit 4fd59e8427e78241b01b1db352ef28be6bf304fd.

The reason is that fix is only for the Docker builds without GPU and breaks all native builds otherwise. We also cannot allow users to specify `120-real` and expect compilation to work at the moment. For Docker builds without GPU the correct way would be to build without GGML_NATIVE

Changed files:
filename: ggml/src/ggml-cuda/CMakeLists.txt
patch: @@ -37,13 +37,14 @@ if (CUDAToolkit_FOUND)
             endif()
         endif()
     endif()
+    message(STATUS "Using CUDA architectures: ${CMAKE_CUDA_ARCHITECTURES}")
 
     enable_language(CUDA)
 
     # Replace any 12x-real architectures with 12x{a}-real. FP4 ptx instructions are not available in just 12x
     if (GGML_NATIVE)
         set(PROCESSED_ARCHITECTURES "")
-        if (NOT DEFINED CMAKE_CUDA_ARCHITECTURES AND CMAKE_CUDA_ARCHITECTURES_NATIVE)
+        if (CMAKE_CUDA_ARCHITECTURES_NATIVE)
             set(ARCH_LIST ${CMAKE_CUDA_ARCHITECTURES_NATIVE})
         else()
             set(ARCH_LIST ${CMAKE_CUDA_ARCHITECTURES})
@@ -65,7 +66,6 @@ if (CUDAToolkit_FOUND)
             endif()
         endforeach()
     endif()
-    message(STATUS "Using CUDA architectures: ${CMAKE_CUDA_ARCHITECTURES}")
 
     file(GLOB   GGML_HEADERS_CUDA "*.cuh")
     list(APPEND GGML_HEADERS_CUDA "../../include/ggml-cuda.h")