OFS / oneapi-asp

Intel® oneAPI Accelerator Support Package (ASP)
MIT License
2 stars 9 forks source link

Configure 2M huge pages (setup_permissions.sh) only configures 1024 2M hugepages #141

Closed umairsiddiqui-digitek closed 1 month ago

umairsiddiqui-digitek commented 6 months ago

the script setup_permissions.sh has a function set_hugepages . This function currently configures only 1024 2M hugepages

################################################################################
# Configure 2M huge pages
#
# Hugepages are used to improve performance of the DMA operations between host
# and FPGA.  The OFS oneAPI-ASP requires a minimum of 4 2M hugepages per FPGA.
# However, there is additional optimization that allows user to pre-pin memory
# using hugepages.  The default setting in this script configures 2048 2M
# hugepages.  This means 4G of host memory is allocated for hugepages.
# This can be changed by configuring OFS_ASP_ENV_NUM_HUGEPAGES before running
# this script.
################################################################################
set_hugepages()
{
  NUM_HUGE_PAGES=${OFS_ASP_ENV_NUM_HUGEPAGES:-1024}

https://github.com/OFS/oneapi-asp/blob/51ccd10edb739581ace2a00f02d2e0dd26e8041f/common/linux64/libexec/setup_permissions.sh#L101

so this line should be

  NUM_HUGE_PAGES=${OFS_ASP_ENV_NUM_HUGEPAGES:-2048}
mfmendoz-Intel commented 1 month ago

Hi @umairsiddiqui-digitek,

Thanks for the observation, this will be fixed in a future release, please see the 2024.2-1 release notes for the workaround for this issue.