mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: oneapi-dnnl: Regenerate autogenerated files.
* gnu/packages/machine-learning.scm (oneapi-dnnl)[source]: Add snippet. [arguments]<#:configure-flags>: Add "-DDNNL_EXPERIMENTAL_UKERNEL=ON". [arguments]<#:phases>: Add 'codegen phase. [native-inputs]: New field to add castxml, clang-17 and python. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
8e79dff65b
commit
598907dbd0
1 changed files with 40 additions and 4 deletions
|
@ -6260,11 +6260,47 @@ Brian 2 simulator.")
|
||||||
(commit (string-append "v" version))))
|
(commit (string-append "v" version))))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "1m2d7qlbfk86rmvmpvx2k3rc2k0l9hf9qpa54jl44670ls9n8i7w"))))
|
(base32 "1m2d7qlbfk86rmvmpvx2k3rc2k0l9hf9qpa54jl44670ls9n8i7w"))
|
||||||
|
(modules '((guix build utils)
|
||||||
|
(ice-9 rdelim)))
|
||||||
|
;; Copyright date used by code generation script
|
||||||
|
(snippet
|
||||||
|
'(for-each
|
||||||
|
(lambda (file)
|
||||||
|
(with-atomic-file-replacement
|
||||||
|
file
|
||||||
|
(lambda (in out)
|
||||||
|
(let loop ((line (read-line in 'concat)))
|
||||||
|
(if (string-contains line "Copyright")
|
||||||
|
(display line out)
|
||||||
|
(loop (read-line in 'concat)))))))
|
||||||
|
'("include/oneapi/dnnl/dnnl_debug.h"
|
||||||
|
"src/common/dnnl_debug_autogenerated.cpp"
|
||||||
|
"tests/benchdnn/dnnl_debug_autogenerated.cpp"
|
||||||
|
"tests/benchdnn/dnnl_debug.hpp")))))
|
||||||
(build-system cmake-build-system)
|
(build-system cmake-build-system)
|
||||||
(arguments (if (target-riscv64?)
|
(arguments
|
||||||
(list #:configure-flags #~'("-DDNNL_CPU_RUNTIME=SEQ"))
|
(list
|
||||||
'()))
|
#:configure-flags
|
||||||
|
`(list
|
||||||
|
,@(if (target-riscv64?)
|
||||||
|
(list #:configure-flags '("-DDNNL_CPU_RUNTIME=SEQ"))
|
||||||
|
'())
|
||||||
|
;; Used in PyTorch
|
||||||
|
"-DDNNL_EXPERIMENTAL_UKERNEL=ON")
|
||||||
|
#:phases
|
||||||
|
'(modify-phases %standard-phases
|
||||||
|
(add-after 'configure 'codegen
|
||||||
|
(lambda _
|
||||||
|
(with-directory-excursion "../source"
|
||||||
|
(invoke "castxml" "--castxml-cc-gnu-c" "clang"
|
||||||
|
"--castxml-output=1" "-DDNNL_EXPERIMENTAL_SPARSE"
|
||||||
|
"-Iinclude" "-I../build/include"
|
||||||
|
"include/oneapi/dnnl/dnnl_types.h" "-o" "types.xml")
|
||||||
|
(invoke "python3" "scripts/generate_dnnl_debug.py" "types.xml")
|
||||||
|
;; Modifies include/oneapi/dnnl/dnnl.hpp
|
||||||
|
(invoke "python3" "scripts/generate_format_tags.py")))))))
|
||||||
|
(native-inputs (list castxml clang-17 python))
|
||||||
(home-page "https://github.com/oneapi-src/oneDNN")
|
(home-page "https://github.com/oneapi-src/oneDNN")
|
||||||
(synopsis "Deep Neural Network Library")
|
(synopsis "Deep Neural Network Library")
|
||||||
(description
|
(description
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue