EnzymeAD / EnzymeAD/Reactant.jl

Experiment with `Core.Memory` address space

オープン
#181 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る
help wanted
主要言語
Julia
スター
370
フォーク
74
平均マージ
18時間 47分
マージ済み PR(30日)
30

説明

Julia 1.11 introduced `Core.Memory` and made `Array` a purely Julia type, which is nice for different optimization reasons. The interesting part for us is that `GenericMemory` has a parameter for `kind` and another for `addrspace`, which could potentially be exploited by us to store the memory managed by XLA.
This means that `ConcreteRArray`s could be managed by a simple `Array` instead, with the address space managed by Reactant.

Docs say the following:

> `addrspace` can currently only be set to Core.CPU. It is designed to permit extension by other systems such as GPUs, which might define values such as:
> ```
> module CUDA
> const Generic = bitcast(Core.AddrSpace{CUDA}, 0)
> const Global = bitcast(Core.AddrSpace{CUDA}, 1)
> end
> ```
> The exact semantics of these other addrspaces is defined by the specific backend, but will error if the user is attempting to access these on the CPU.

A lot of info is missing on how to customize this behavior but we should keep an eye on it.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。