Skip to content

Commit 390b87a

Browse files
authored
Fix iOS app store validation issues (#3071)
* put ug cuda behind cuda flag * revert to ug 0.0.2 when on ios * if only use ug if target_os is not ios added to wasm check already there
1 parent 93845ed commit 390b87a

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

candle-core/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ rand_distr = { workspace = true }
3030
rayon = { workspace = true }
3131
safetensors = { workspace = true }
3232
thiserror = { workspace = true }
33-
ug-cuda = { workspace = true, optional = true }
34-
ug-metal = { workspace = true, optional = true }
3533
yoke = { workspace = true }
3634
zip = { workspace = true }
3735

38-
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
36+
[target.'cfg(all(not(target_arch = "wasm32"), not(target_os = "ios")))'.dependencies]
3937
ug = { workspace = true }
38+
ug-cuda = { workspace = true, optional = true }
39+
ug-metal = { workspace = true, optional = true }
4040

4141
[dev-dependencies]
4242
anyhow = { workspace = true }

candle-core/src/custom_op.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ pub struct UgIOp1 {
386386

387387
impl UgIOp1 {
388388
#[allow(unused)]
389-
#[cfg(not(target_arch = "wasm32"))]
389+
#[cfg(all(not(target_arch = "wasm32"), not(target_os = "ios")))]
390390
pub fn new(
391391
name: &'static str,
392392
kernel: ug::lang::ssa::Kernel,

candle-core/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ pub enum Error {
172172
#[error("Metal error {0}")]
173173
Metal(#[from] MetalError),
174174

175-
#[cfg(not(target_arch = "wasm32"))]
175+
#[cfg(all(not(target_arch = "wasm32"), not(target_os = "ios")))]
176176
#[error(transparent)]
177177
Ug(#[from] ug::Error),
178178

candle-core/src/metal_backend/device.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl std::ops::Deref for MetalDevice {
7373
}
7474

7575
impl MetalDevice {
76-
#[cfg(not(target_arch = "wasm32"))]
76+
#[cfg(all(not(target_arch = "wasm32"), not(target_os = "ios")))]
7777
pub fn compile(
7878
&self,
7979
func_name: &'static str,

0 commit comments

Comments
 (0)