mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-03 00:47:53 +00:00
temp test for windows
This commit is contained in:
1 parent
360c3a268b
commit
202b7876b4
4 files changed
+20
No files matched your search
Generated
+1
@@ -629,6 +629,7 @@ dependencies = [
|
||||
"filesys",
|
||||
"hf-hub 0.3.2",
|
||||
"image",
|
||||
"libloading 0.8.6",
|
||||
"log",
|
||||
"memory_caching",
|
||||
"once_cell",
|
||||
|
||||
@@ -48,3 +48,6 @@ tokenizers = "0.15.2"
|
||||
[features]
|
||||
default = ["cuda"]
|
||||
cuda = ["candle-core/cuda", "candle-nn/cuda", "candle-transformers/cuda"]
|
||||
|
||||
[dev-dependencies]
|
||||
libloading = "0.8.6"
|
||||
@@ -1,6 +1,15 @@
|
||||
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
use std::fs::File;
|
||||
|
||||
fn main() {
|
||||
// NB: This is a test to see the behavior of the application with dynamic loading modules.
|
||||
// We should be able to execute code before loading CUDA and other dependencies.
|
||||
let r = File::create("program_started.txt");
|
||||
match r {
|
||||
Err(err) => println!("Failed to create program_started.txt: {}", err),
|
||||
Ok(_) => {}
|
||||
}
|
||||
app_lib::run();
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
#[test]
|
||||
fn test_dynamic_library_loading() {
|
||||
let name = libloading::library_filename("cublas");
|
||||
|
||||
assert_eq!(name, "libcublas.so");
|
||||
}
|
||||
Reference in new issue
Block a user