Skip to content
Snippets Groups Projects
Commit d8e05684 authored by rarbore2's avatar rarbore2
Browse files

use cuda as default device if cuda feature present

parent ca20c08f
No related branches found
No related tags found
1 merge request!115GPU backend
Pipeline #200979 failed
...@@ -4,6 +4,9 @@ version = "0.1.0" ...@@ -4,6 +4,9 @@ version = "0.1.0"
authors = ["Russel Arbore <rarbore2@illinois.edu>"] authors = ["Russel Arbore <rarbore2@illinois.edu>"]
edition = "2021" edition = "2021"
[features]
cuda = []
[dependencies] [dependencies]
rand = "*" rand = "*"
ordered-float = "*" ordered-float = "*"
......
...@@ -13,6 +13,8 @@ pub fn device_placement(functions: &Vec<Function>, callgraph: &CallGraph) -> Vec ...@@ -13,6 +13,8 @@ pub fn device_placement(functions: &Vec<Function>, callgraph: &CallGraph) -> Vec
devices.push(device); devices.push(device);
} else if function.entry || callgraph.num_callees(FunctionID::new(idx)) != 0 { } else if function.entry || callgraph.num_callees(FunctionID::new(idx)) != 0 {
devices.push(Device::AsyncRust); devices.push(Device::AsyncRust);
} else if cfg!(feature = "cuda") {
devices.push(Device::CUDA);
} else { } else {
devices.push(Device::LLVM); devices.push(Device::LLVM);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment