mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 18:48:51 +00:00
Fix candle-flash-attn build on Windows (msvc) (#2734)
This commit is contained in:
@ -88,6 +88,12 @@ fn main() -> Result<()> {
|
|||||||
.arg("--use_fast_math")
|
.arg("--use_fast_math")
|
||||||
.arg("--verbose");
|
.arg("--verbose");
|
||||||
|
|
||||||
|
if let Ok(target) = std::env::var("TARGET") {
|
||||||
|
if target.contains("msvc") {
|
||||||
|
builder = builder.arg("-D_USE_MATH_DEFINES");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let out_file = build_dir.join("libflashattention.a");
|
let out_file = build_dir.join("libflashattention.a");
|
||||||
builder.build_lib(out_file);
|
builder.build_lib(out_file);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user