lattice / quda

QUDA is a library for performing calculations in lattice QCD on GPUs.
https://lattice.github.io/quda
Other
279 stars 94 forks source link

building for HIP #1251

Open james-simone opened 2 years ago

james-simone commented 2 years ago

Add a page to the wiki documentation on how to build for HIP.

maddyscientist commented 2 years ago

Assigning to @bjoo

bjoo commented 2 years ago

Will get to it eventually.

james-simone commented 2 years ago

Hi Balint,

Would it be possible to send cmake options for a hip build? Also, is there a particular branch that should be used?

—jim

On 2/21/22, 11:05 AM, "Balint Joo" @.***> wrote:

Will get to it eventually.
—
Reply to this email directly, view it on GitHub <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_lattice_quda_issues_1251-23issuecomment-2D1047080697&d=DwMCaQ&c=gRgGjJ3BkIsb5y6s49QqsA&r=9pGwH941nYC6vS4VlvwK0Q&m=bQzXodcXCo9DZ3zLwjAxXEpOv7evL6oBqTrNK-JFGMHJpJrhL-lBKQPn_6kAVMLL&s=qB-oPZHSiiw3J77nVvpfnZiYlG34_DuE5Sw9mLOQbJQ&e=>, or unsubscribe <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ABRABTRKFZIYP77ZWMI2RNLU4JWFNANCNFSM5O65CXMQ&d=DwMCaQ&c=gRgGjJ3BkIsb5y6s49QqsA&r=9pGwH941nYC6vS4VlvwK0Q&m=bQzXodcXCo9DZ3zLwjAxXEpOv7evL6oBqTrNK-JFGMHJpJrhL-lBKQPn_6kAVMLL&s=aBoDIGNSkuibpo6y7VfliwQMUkhRu_LM9TjVx41MIf0&e=>.
Triage notifications on the go with GitHub Mobile for iOS <https://urldefense.proofpoint.com/v2/url?u=https-3A__apps.apple.com_app_apple-2Dstore_id1477376905-3Fct-3Dnotification-2Demail-26mt-3D8-26pt-3D524675&d=DwMCaQ&c=gRgGjJ3BkIsb5y6s49QqsA&r=9pGwH941nYC6vS4VlvwK0Q&m=bQzXodcXCo9DZ3zLwjAxXEpOv7evL6oBqTrNK-JFGMHJpJrhL-lBKQPn_6kAVMLL&s=eKxU6tL0zCQlQX_kDv_PM7la1E_kt-ef6UvR6lXjMZA&e=> or Android <https://urldefense.proofpoint.com/v2/url?u=https-3A__play.google.com_store_apps_details-3Fid-3Dcom.github.android-26referrer-3Dutm-5Fcampaign-253Dnotification-2Demail-2526utm-5Fmedium-253Demail-2526utm-5Fsource-253Dgithub&d=DwMCaQ&c=gRgGjJ3BkIsb5y6s49QqsA&r=9pGwH941nYC6vS4VlvwK0Q&m=bQzXodcXCo9DZ3zLwjAxXEpOv7evL6oBqTrNK-JFGMHJpJrhL-lBKQPn_6kAVMLL&s=7OhcWcoZzBq_1p59xzHRRtddFLf-o34JavEDuedSdrI&e=>. 
You are receiving this because you authored the thread.Message ID: ***@***.***>
[
{
***@***.***": "http://schema.org",
***@***.***": "EmailMessage",
"potentialAction": {
***@***.***": "ViewAction",
"target": "https://github.com/lattice/quda/issues/1251#issuecomment-1047080697",
"url": "https://github.com/lattice/quda/issues/1251#issuecomment-1047080697",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
***@***.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]
bjoo commented 2 years ago

Yes:

For now use the feature/hip-compiler-fixes branch The build script I have been using is below:

notes: a) gfx90a is MI250 a la crusher. b) I chose to not download Eigen. It really repends whether the machine you have access to has internet access or not. c) The current build structure needs HIP-Language support. I am using cmake/3.22.1 d) Supposedly downloading USQCD like QIO and stuff also works, I get my QIO from QDP++ and Chroma and tend to not enable this for QUDA.

Good Luck! Best, B

The QUDA_GPU_ARCH is necessary despite the apparent redundancy

of setting also -DGPU_TARGETS

# export QUDA_GPU_ARCH=gfx90a cmake ${SRCROOT}/quda \ -G "Unix Makefiles" \ -DQUDA_TARGET_TYPE="HIP" \ -DROCM_PATH=${ROCM_PATH} \ -DQUDA_DIRAC_CLOVER=ON \ -DQUDA_DIRAC_CLOVER_HASENBUSCH=ON \ -DQUDA_DIRAC_DOMAIN_WALL=ON \ -DQUDA_DIRAC_NDEG_TWISTED_MASS=OFF \ -DQUDA_DIRAC_STAGGERED=ON \ -DQUDA_DIRAC_TWISTED_MASS=OFF \ -DQUDA_DIRAC_TWISTED_CLOVER=OFF \ -DQUDA_DIRAC_WILSON=ON \ -DQUDA_DYNAMIC_CLOVER=OFF \ -DQUDA_FORCE_GAUGE=ON \ -DQUDA_FORCE_HISQ=ON \ -DQUDA_GAUGE_ALG=ON \ -DQUDA_GAUGE_TOOLS=OFF \ -DQUDA_INTERFACE_MILC=ON \ -DQUDA_INTERFACE_CPS=OFF \ -DQUDA_INTERFACE_QDP=ON \ -DQUDA_INTERFACE_TIFR=OFF \ -DQUDA_QMP=ON \ -DQMP_DIR=${INSTALLROOT}/qmp/lib/cmake/QMP \ -DQUDA_QIO=OFF \ -DQUDA_OPENMP=OFF \ -DQUDA_MULTIGRID=ON \ -DQUDA_MAX_MULTI_BLAS_N=9 \ -DQUDA_DOWNLOAD_EIGEN=OFF \ -DEIGEN_INCLUDE_DIR=${SRCROOT}/eigen-3.3.9 \ -DCMAKE_INSTALL_PREFIX=${INSTALLROOT}/quda \ -DCMAKE_BUILD_TYPE="DEVEL" \ -DGPU_TARGETS="gfx90a" \ -DCMAKE_CXX_COMPILER="hipcc"\ -DCMAKE_C_COMPILER="hipcc" \ -DBUILD_SHARED_LIBS=ON \ -DQUDA_BUILD_SHAREDLIB=ON \ -DQUDA_BUILD_ALL_TESTS=OFF \ -DQUDA_CTEST_DISABLE_BENCHMARKS=ON \ -DCMAKE_CXX_FLAGS="${MPI_CFLAGS}" \ -DCMAKE_C_FLAGS="${MPI_CFLAGS}" \ -DCMAKE_EXE_LINKER_FLAGS="${MPI_LDFLAGS}" \ -DCMAKE_SHARED_LINKER_FLAGS="${MPI_LDFLAGS}" \ -DCMAKE_C_STANDARD=99

Balint Joo, Oak Ridge Leadership Computing Facility, Oak Ridge National Laboratory P.O. Box 2008, 1 Bethel Valley Road, Oak Ridge, TN 37831, USA email: joob AT ornl.gov. Tel: +1-757-912-0566 (cell, remote)

From: James Simone @.> Reply-To: lattice/quda @.> Date: Monday, February 21, 2022 at 12:23 PM To: lattice/quda @.> Cc: Balint Joo @.>, Mention @.> Subject: [EXTERNAL] Re: [lattice/quda] building for HIP (Issue #1251) Resent-From: @.> Resent-Date: Monday, February 21, 2022 at 12:23 PM

Hi Balint,

Would it be possible to send cmake options for a hip build? Also, is there a particular branch that should be used?

—jim

On 2/21/22, 11:05 AM, "Balint Joo" @.***> wrote:

Will get to it eventually. — Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_lattice_quda_issues_1251-23issuecomment-2D1047080697&d=DwMCaQ&c=gRgGjJ3BkIsb5y6s49QqsA&r=9pGwH941nYC6vS4VlvwK0Q&m=bQzXodcXCo9DZ3zLwjAxXEpOv7evL6oBqTrNK-JFGMHJpJrhL-lBKQPn_6kAVMLL&s=qB-oPZHSiiw3J77nVvpfnZiYlG34_DuE5Sw9mLOQbJQ&e=, or unsubscribe https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ABRABTRKFZIYP77ZWMI2RNLU4JWFNANCNFSM5O65CXMQ&d=DwMCaQ&c=gRgGjJ3BkIsb5y6s49QqsA&r=9pGwH941nYC6vS4VlvwK0Q&m=bQzXodcXCo9DZ3zLwjAxXEpOv7evL6oBqTrNK-JFGMHJpJrhL-lBKQPn_6kAVMLL&s=aBoDIGNSkuibpo6y7VfliwQMUkhRu_LM9TjVx41MIf0&e=. Triage notifications on the go with GitHub Mobile for iOS https://urldefense.proofpoint.com/v2/url?u=https-3A__apps.apple.com_app_apple-2Dstore_id1477376905-3Fct-3Dnotification-2Demail-26mt-3D8-26pt-3D524675&d=DwMCaQ&c=gRgGjJ3BkIsb5y6s49QqsA&r=9pGwH941nYC6vS4VlvwK0Q&m=bQzXodcXCo9DZ3zLwjAxXEpOv7evL6oBqTrNK-JFGMHJpJrhL-lBKQPn_6kAVMLL&s=eKxU6tL0zCQlQX_kDv_PM7la1E_kt-ef6UvR6lXjMZA&e= or Android https://urldefense.proofpoint.com/v2/url?u=https-3A__play.google.com_store_apps_details-3Fid-3Dcom.github.android-26referrer-3Dutm-5Fcampaign-253Dnotification-2Demail-2526utm-5Fmedium-253Demail-2526utm-5Fsource-253Dgithub&d=DwMCaQ&c=gRgGjJ3BkIsb5y6s49QqsA&r=9pGwH941nYC6vS4VlvwK0Q&m=bQzXodcXCo9DZ3zLwjAxXEpOv7evL6oBqTrNK-JFGMHJpJrhL-lBKQPn_6kAVMLL&s=7OhcWcoZzBq_1p59xzHRRtddFLf-o34JavEDuedSdrI&e=. You are receiving this because you authored the thread.Message ID: @.> [ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/lattice/quda/issues/1251#issuecomment-1047080697", "url": "https://github.com/lattice/quda/issues/1251#issuecomment-1047080697", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

— Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_lattice_quda_issues_1251-23issuecomment-2D1047096335&d=DwMFaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=WG01dcOd8ZFLFFNkrpbj6A&m=sP22VaiyvazJLndebLM8Olm3BG6rtQx8V08SwMRJiECf46heS2bDApup9xx20K78&s=RGPR_PBEUWMuhsgKxJeZdA7b9493IFC1wgaIBdh7SpA&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAEPL2FDNUXVY37KY7CKP73U4JYJ3ANCNFSM5O65CXMQ&d=DwMFaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=WG01dcOd8ZFLFFNkrpbj6A&m=sP22VaiyvazJLndebLM8Olm3BG6rtQx8V08SwMRJiECf46heS2bDApup9xx20K78&s=NIzaTwy1HbkZ6smJIQEOxYqp6DqUq4mkwW9MFlyYTYQ&e=. Triage notifications on the go with GitHub Mobile for iOShttps://urldefense.proofpoint.com/v2/url?u=https-3A__apps.apple.com_app_apple-2Dstore_id1477376905-3Fct-3Dnotification-2Demail-26mt-3D8-26pt-3D524675&d=DwMFaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=WG01dcOd8ZFLFFNkrpbj6A&m=sP22VaiyvazJLndebLM8Olm3BG6rtQx8V08SwMRJiECf46heS2bDApup9xx20K78&s=dQRVngHymXaXaYT6Fpm2E972lKG176Lbj1J-Uly5cUY&e= or Androidhttps://urldefense.proofpoint.com/v2/url?u=https-3A__play.google.com_store_apps_details-3Fid-3Dcom.github.android-26referrer-3Dutm-5Fcampaign-253Dnotification-2Demail-2526utm-5Fmedium-253Demail-2526utm-5Fsource-253Dgithub&d=DwMFaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=WG01dcOd8ZFLFFNkrpbj6A&m=sP22VaiyvazJLndebLM8Olm3BG6rtQx8V08SwMRJiECf46heS2bDApup9xx20K78&s=5xDmzg0y3HJJ3aNy-1uc3T9omQCxdWsGhb20VGyl2w8&e=. You are receiving this because you were mentioned.Message ID: @.***>