-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CPU backend #647
CPU backend #647
Conversation
cc @giordano |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds cool!
src/Compiler.jl
Outdated
elseif backend == "CPU" | ||
backend = "cpu" | ||
end | ||
@show backend |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leftover debug print?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or rather "curreently being debugged print" :P
On macOS: $ nm /Users/mose/.julia/artifacts/f3d3555e5fc223023219f21123197e90fa208f2d/lib/libReactantExtra.dylib | grep ClientGetPlatformName
000000000000472c t _ClientGetPlatformName Lowercase |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@avik-pal was that fn not marked exported? |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
end | ||
end | ||
|
||
if device_ordinal < 0 | ||
device_ordinal = XLA.DeviceToClientDeviceOrdinal(device) | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
exec = XLA.Compile( | ||
client, | ||
mod; | ||
device_ordinal, | ||
num_replicas=1, | ||
num_partitions=1, | ||
use_shardy_partitioner=false, | ||
mod | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
exec = XLA.Compile( | |
client, | |
mod; | |
device_ordinal, | |
num_replicas=1, | |
num_partitions=1, | |
use_shardy_partitioner=false, | |
mod | |
) | |
exec = XLA.Compile(client, mod) |
function Compile( | ||
client::Client, | ||
mod::MLIR.IR.Module; | ||
device_ordinal::Int=-1, | ||
num_replicas::Int=1, | ||
num_partitions::Int=1, | ||
use_shardy_partitioner::Bool=false, | ||
mod::MLIR.IR.Module | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
function Compile( | |
client::Client, | |
mod::MLIR.IR.Module; | |
device_ordinal::Int=-1, | |
num_replicas::Int=1, | |
num_partitions::Int=1, | |
use_shardy_partitioner::Bool=false, | |
mod::MLIR.IR.Module | |
) | |
function Compile(client::Client, mod::MLIR.IR.Module) |
Naturally, requires jll update.
But enables us to run GPU kernels on CPU (without a cuda device)