Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ebrains-spack-builds
Manage
Activity
Members
Labels
Plan
Issues
30
Issue boards
Milestones
Wiki
Code
Merge requests
30
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EBRAINS RI
Tech Hub
Platform
EBRAINS Software Distribution
ebrains-spack-builds
Commits
35ccead6
Commit
35ccead6
authored
2 months ago
by
Eric Müller
Browse files
Options
Downloads
Patches
Plain Diff
fix(py-tensorflow): build w/ modern cuda
parent
71fcc9f9
No related branches found
Branches containing commit
No related tags found
1 merge request
!655
Draft: Fix py-{jax{,lib},tensorflow}+cuda
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/py-tensorflow/cub_ThreadLoadVolatilePointer.patch
+34
-0
34 additions, 0 deletions
packages/py-tensorflow/cub_ThreadLoadVolatilePointer.patch
packages/py-tensorflow/package.py
+3
-0
3 additions, 0 deletions
packages/py-tensorflow/package.py
with
37 additions
and
0 deletions
packages/py-tensorflow/cub_ThreadLoadVolatilePointer.patch
0 → 100644
+
34
−
0
View file @
35ccead6
diff --git a/tensorflow/core/kernels/gpu_prim.h b/tensorflow/core/kernels/gpu_prim.h
index bef22b5..94fd951 100644
--- a/tensorflow/core/kernels/gpu_prim.h
+++ b/tensorflow/core/kernels/gpu_prim.h
@@ -44,10 +44,10 @@
__device__ __forceinline__ void ThreadStoreVolatilePtr<Eigen::half>(
Eigen::numext::bit_cast<uint16_t>(val);
}
-
-template <>
-__device__ __forceinline__ Eigen::half ThreadLoadVolatilePointer<Eigen::half>(
- Eigen::half *ptr, Int2Type<true> /*is_primitive*/) {
- uint16_t result = *reinterpret_cast<volatile uint16_t *>(ptr);
+
+__device__ __forceinline__ Eigen::half ThreadLoadVolatilePointer(
+ const Eigen::half *ptr, Int2Type<true> /*is_primitive*/) {
+ uint16_t result = *reinterpret_cast<volatile const uint16_t *>(ptr);
return Eigen::numext::bit_cast<Eigen::half>(result);
}
-
@@ -59,11 +59,9 @@
__device__ __forceinline__ void ThreadStoreVolatilePtr<Eigen::bfloat16>(
Eigen::numext::bit_cast<uint16_t>(val);
}
-
-template <>
-__device__ __forceinline__ Eigen::bfloat16
-ThreadLoadVolatilePointer<Eigen::bfloat16>(Eigen::bfloat16 *ptr,
- Int2Type<true> /*is_primitive*/) {
- uint16_t result = *reinterpret_cast<volatile uint16_t *>(ptr);
+__device__ __forceinline__ Eigen::bfloat16 ThreadLoadVolatilePointer(
+ const Eigen::bfloat16 *ptr, Int2Type<true> /*is_primitive*/) {
+ uint16_t result = *reinterpret_cast<volatile const uint16_t *>(ptr);
return Eigen::numext::bit_cast<Eigen::bfloat16>(result);
}
-
This diff is collapsed.
Click to expand it.
packages/py-tensorflow/package.py
+
3
−
0
View file @
35ccead6
...
...
@@ -568,6 +568,9 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension):
when
=
"
@2.18.0 %gcc
"
,
)
# adapted from https://github.com/tensorflow/tensorflow/commit/5467ee993e1d3e4709c1e99f3a15a978325ae536
patch
(
"
cub_ThreadLoadVolatilePointer.patch
"
,
when
=
"
@2.18.0 ^cuda@12.8
"
)
def
flag_handler
(
self
,
name
,
flags
):
spec
=
self
.
spec
# ubuntu gcc has this workaround turned on by default in aarch64
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment