Skip to content

The proposed fix for the part number extraction logic from platforminfo #73

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

salehjg
Copy link

@salehjg salehjg commented Mar 21, 2025

The proposed fix for the part number extraction logic from platforminfo utility output on AWS F1 (Ubuntu AMI/2024.1).

The proposed logic is to skip the extraction step if PROGRAM_PLATFORM_PART is defined beforehand. For example: set(PROGRAM_PLATFORM_PART "xcvu9p-flga2104-2-e" CACHE INTERNAL "F1 part number")

To confirm that this does not break anything else that depends on the part number variable:

  1. A kernel should be defined and hw_emu/hw builds should be run.
  2. HLS synthesis should be run for a given kernel target to be sure it works as intended.

My information is a bit rusty (I used to work with SDAccel 2019.1 and many things have been changed/depreciated).

Also, see #72 for more details on the problem.

…fo utility output on AWS F1 (Ubuntu AMI/2024.1).

The proposed logic is to skip the extraction step if `PROGRAM_PLATFORM_PART` is defined beforehand. For example: `set(PROGRAM_PLATFORM_PART "xcvu9p-flga2104-2-e" CACHE INTERNAL "F1 part number")`
Copy link
Owner

@definelicht definelicht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you give this a try using a non-F1 platform as well? 🙂

@@ -476,7 +476,7 @@ function(add_vitis_program
set(PROGRAM_DEPENDS ${PROGRAM_DEPENDS} ${_PROGRAM_DEPENDS})

# Recover the part name used by the given platform
if(NOT PROGRAM_PLATFORM_PART OR NOT "${${PROGRAM_TARGET}_PLATFORM}" STREQUAL "${PROGRAM_PLATFORM}")
if(((NOT DEFINED PROGRAM_PLATFORM_PART) OR (NOT PROGRAM_PLATFORM_PART)) AND (NOT "${${PROGRAM_TARGET}_PLATFORM}" STREQUAL "${PROGRAM_PLATFORM}"))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the DEFINED necessary? I thought both undefined and empty would fail the plain check.

IIUC this is effectively turning the OR into an AND?

Copy link
Author

@salehjg salehjg Mar 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly. I agree.
The only difference of NOT DEFINED VAR and NOT VAR is when VAR is defined, but as an empty string. ORing them will be identical to NOT VAR.

@@ -485,6 +485,7 @@ function(add_vitis_program
set(PROGRAM_PLATFORM_PART ${PLATFORM_PART} CACHE INTERNAL "")
endif()
endif()
message(STATUS "Deduced PROGRAM_PLATFORM_PART: ${PROGRAM_PLATFORM_PART}")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should print the internal CMake variable name

@salehjg
Copy link
Author

salehjg commented Mar 21, 2025 via email

@definelicht
Copy link
Owner

Unfortunately, at the moment I only have access to the aws f1 instances. I need a day or two to test it on F1 to make sure it doesn't break other stuff.

No worries! To be honest with I haven't had (easy) access to FPGA development platform tools for years now, so it's not quick for me to test either. I wonder if @derpda is still active?

@derpda
Copy link
Contributor

derpda commented Mar 21, 2025

Ohh a little blast from the past!
I'm not currently active in FPGA development either, but hopefully will be later this year or early next year...

@salehjg
Copy link
Author

salehjg commented Mar 24, 2025

Today, I ran hw_emu for a small kernel and it generated the xclbin file without a complaint.
Unfortunately, the hw run crashed since the instance did not have enough ram/swap.
Now, I only need to test to see if I can launch Vivado HLS for a specific kernel and see if everything's set.

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

Successfully merging this pull request may close these issues.

3 participants