| has_metal | R Documentation |
Report whether the fixed CPU/Metal operation-split fastPLS backend can be used in the current session.
has_metal()
has_metal() returns TRUE only when both conditions hold:
the package was built with Apple Metal support;
the Metal backend is available in the current session.
If either condition is not met, the function returns FALSE. This includes
non-macOS builds and portable builds that use the Metal stub backend. The result
describes backend availability for the current R session; it does not select a
device, allocate GPU memory, or run a test computation. When the Xcode Metal
compiler is available during installation, fastPLS compiles and embeds its
custom shader library. Device and pipeline initialization is then incurred by
the first Metal operation, while subsequent operations in the same R session
reuse the initialized state. A true result identifies availability of the
operation-split backend; it does not imply that an entire PLS fit is GPU
resident.
A length-1 logical.
has_cuda, fastsvd, pls
has_metal()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.