Skip to content

Commit

Permalink
Accidentally broke build. Unbreak it.
Browse files Browse the repository at this point in the history
  • Loading branch information
Noeda committed Apr 6, 2023
1 parent f5328ab commit 6751f59
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/rllama_main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
}
};

#[cfg(feature = "opencl")]
let has_opencl = opencl.is_some();

// Read ModelParams from param_path, we expect it to be JSON
let mut fs = std::fs::File::open(&param_path)?;
let mut bs = Vec::new();
Expand Down Expand Up @@ -227,7 +230,12 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
DataSettings::new()
};

if cli.f16 || opencl.is_some() {
#[cfg(feature = "opencl")]
if cli.f16 || has_opencl {
data_settings = data_settings.force_f16();
}
#[cfg(not(feature = "opencl"))]
if cli.f16 {
data_settings = data_settings.force_f16();
}

Expand Down

0 comments on commit 6751f59

Please sign in to comment.