| Title: | Metal Sparse Backend for 'amatrix' on macOS |
|---|---|
| Description: | Experimental sparse-first GPU backend for the 'amatrix' package using Apple 'Metal'. Provides a direct Objective-C++ bridge for sparse matrix times dense matrix products on macOS; on other platforms (or without the 'Metal' frameworks) it builds a mock bridge and reports itself unavailable, so installation is safe anywhere. |
| Authors: | Bradley Buchsbaum [aut, cre] |
| Maintainer: | Bradley Buchsbaum <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-07-10 10:09:33 UTC |
| Source: | https://github.com/bbuchsbaum/amatrix |
Enable, reset, and read lightweight native timing counters for the Metal backend bridge. Counters cover sparse and dense uploads, sparse product command submission and synchronization, deferred pending waits, and host materialization. Profiling is disabled by default to avoid overhead in normal use.
amatrix_metal_profile(reset = FALSE) amatrix_metal_profile_enable(enabled = TRUE, reset = FALSE) amatrix_metal_profile_reset()amatrix_metal_profile(reset = FALSE) amatrix_metal_profile_enable(enabled = TRUE, reset = FALSE) amatrix_metal_profile_reset()
reset |
Logical scalar. For |
enabled |
Logical scalar. Whether native Metal bridge profiling should collect timing counters. |
amatrix_metal_profile() returns a named numeric vector of timing counters in milliseconds plus call counts. The enable and reset helpers return invisibly.
## Not run: amatrix_metal_enable_probe(register = TRUE) amatrix_metal_profile_enable(TRUE, reset = TRUE) # Run Metal-backed operations here. amatrix_metal_profile() amatrix_metal_profile_enable(FALSE) ## End(Not run)## Not run: amatrix_metal_enable_probe(register = TRUE) amatrix_metal_profile_enable(TRUE, reset = TRUE) # Run Metal-backed operations here. amatrix_metal_profile() amatrix_metal_profile_enable(FALSE) ## End(Not run)