Skip to content
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

Add missing include files #315

Merged
merged 1 commit into from Feb 22, 2022
Merged

Conversation

markdewing
Copy link
Contributor

[hip] - cstring for std::memcpy and cstddef for size_t
[serial] - cstddef for size_t

[hip] - cstring for std::memcpy and cstddef for size_t
[serial] - cstddef for size_t
@makortel makortel merged commit a2f6102 into cms-patatrack:master Feb 22, 2022
@fwyzard
Copy link
Contributor

fwyzard commented Feb 23, 2022

FYI, to build with ROCm 5.0 I need to patch one file in the Eigen external:

diff --git a/Eigen/src/Core/products/GeneralBlockPanelKernel.h b/Eigen/src/Core/products/GeneralBlockPanelKernel.h
index 40171eb83..b073ecf7a 100644
--- a/Eigen/src/Core/products/GeneralBlockPanelKernel.h
+++ b/Eigen/src/Core/products/GeneralBlockPanelKernel.h
@@ -73,13 +73,7 @@ struct CacheSizes {
   CacheSizes(): m_l1(-1),m_l2(-1),m_l3(-1) {
     int l1CacheSize, l2CacheSize, l3CacheSize;
 
-#if !defined(EIGEN_CUDA_ARCH)
     queryCacheSizes(l1CacheSize, l2CacheSize, l3CacheSize);
-#else
-    l1CacheSize = defaultL1CacheSize;
-    l2CacheSize = 1572864;
-    l3CacheSize = defaultL3CacheSize;
-#endif
     m_l1 = manage_caching_sizes_helper(l1CacheSize, defaultL1CacheSize);
     m_l2 = manage_caching_sizes_helper(l2CacheSize, defaultL2CacheSize);
     m_l3 = manage_caching_sizes_helper(l3CacheSize, defaultL3CacheSize);
@@ -117,7 +111,19 @@ inline void manage_caching_sizes(Action action, std::ptrdiff_t* l1, std::ptrdiff
   {
     eigen_internal_assert(false);
   }
-  #else // EIGEN_CUDA_ARCH
+  #elif defined(EIGEN_HIP_DEVICE_COMPILE)
+  if (action==GetAction)
+  {
+    // GCN 5.0 / Radeon Pro WX 9100
+    *l1 =         16 * 1024;  // 16 KB per CU
+    *l2 =   4 * 1024 * 1024;  // 4 MB
+    *l3 =                 0;
+  }
+  else
+  {
+    eigen_internal_assert(false);
+  }
+  #else
   static CacheSizes m_cacheSizes;
 
   if(action==SetAction)

@makortel
Copy link
Collaborator

I wonder if that patch would work with earlier ROCm versions (say down to 4.3)? Also, if we should look into applying this patch locally (as we did earlier), propagating it to CMS' eigen mirror, or trying to get it into upstream?

@fwyzard
Copy link
Contributor

fwyzard commented Feb 24, 2022

The patch is on top of the other CMS / Patatrack changes, so it'll take some effort to upstream everything.

@fwyzard
Copy link
Contributor

fwyzard commented Feb 24, 2022

I've pushed it to the CMS repository and update the pixeltrack-standalone Makefile (via #319)

@fwyzard
Copy link
Contributor

fwyzard commented Feb 24, 2022

And the update for CMSSW_12_3_X is in cms-sw/cmsdist#7649 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants