Skip to content

EXSWHTEC-109 - Implement tests for the hipModuleLoad family of APIs and hipModuleUnload - #20

Closed
music-dino wants to merge 22 commits into
ROCm:developfrom
mirza-halilcevic:hipModuleLoad_tests
Closed

music-dino wants to merge 22 commits into
ROCm:developfrom
mirza-halilcevic:hipModuleLoad_tests

Conversation

@music-dino

@music-dino music-dino commented Dec 7, 2022

Copy link
Copy Markdown
Contributor
  • Implement positive and negative tests for hipModuleLoad
  • Implement positive and negative tests for hipModuleLoadData
  • Implement positive and negative tests for hipModuleLoadDataEx
  • Implement positive tests for hipModuleUnload as part of the above tests
  • Implement negative tests for hipModuleUnload.

gargrahul and others added 9 commits October 26, 2022 03:59
Change-Id: I66f0c09e9c7405ec7430b1883e0e89542fdb87a0
Change-Id: I212b82b1b3a78a368b85ea64e338371a34b405f9
Change-Id: Ib455f72b5be77e1a81137d15c07ea41161b16a3e
Change-Id: Ief96e274f4143e80ceb3e40f04d38ae217777583
Change-Id: I9c03cde09b42c8e3726153c2a177359efc8d6d29
…nd hipModuleUnload

- Basic positive tests
- Negative parameter tests
Comment thread catch/unit/module/CMakeLists.txt Outdated
Comment on lines +11 to +13
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/empty_module.code
COMMAND ${CMAKE_CXX_COMPILER} --genco --std=c++17 ${CMAKE_CURRENT_SOURCE_DIR}/empty_module.cc -o empty_module.code
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/empty_module.cc)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

genco does not work properly on windows yet. you will need to exclude this test building on windows. additionally you are missing specifying the offload arch & output path for building the code object. see unit/deviceLib/CMakeLists.txt for an example of how to do it for all of the above.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Requested changes have been implemented, please proceed.

Comment thread catch/unit/module/hipModuleLoad.cc Outdated
}

// Disabled for AMD due to defect - EXSWHTEC-151
#if HT_NVIDIA

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Create a new TEST_CAST for this and disable it via json.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The requested change has been implemented.

Comment thread catch/unit/module/hipModuleLoadData.cc Outdated
}

// Disabled for AMD due to defect - EXSWHTEC-153
#if HT_NVIDIA

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The requested change has been implemented.

}

// Disabled for AMD due to defect - EXSWHTEC-153
#if HT_NVIDIA

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

again

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The requested change has been implemented.

Comment thread catch/unit/module/hipModuleUnload.cc Outdated
HIP_CHECK(hipFree(nullptr));

// Disabled for AMD due to defect - EXSWHTEC-152
#if HT_NVIDIA

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

again

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The requested change has been implemented.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is the empty file necessary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The test requires a file that exists in the filesystem, but does not represent a valid module file. This seemed like the most straightforward approach.

@music-dino

Copy link
Copy Markdown
Contributor Author

@rorake I don't see your comment for some reason, so I cannot quote reply to it. Merge conflicts have been resolved, please proceed.

@rakesroy

Copy link
Copy Markdown
Contributor

PR has been merged into develop branch via commit 2c6d940.

@rakesroy rakesroy closed this Feb 26, 2024
rocm-ci pushed a commit that referenced this pull request Feb 26, 2024
…nd hipModuleUnload #20

Change-Id: I19d6534af2c33046dc3862372d45f32b6ccc6ad1
rocm-ci pushed a commit that referenced this pull request Feb 26, 2024
- #119
- #151
- #57
- #58
- #59
- #60
- #99
- #139
- #152
- #48
- #54
- #53
- #24
- #23
- #22
- #21
- #20
- #14
- #8

Change-Id: I1eea54cd1436f3ddbfd5c1b3b2f672eb81d03cd4
ammallya pushed a commit that referenced this pull request Oct 28, 2025
…nd hipModuleUnload #20

Change-Id: I19d6534af2c33046dc3862372d45f32b6ccc6ad1


[ROCm/hip-tests commit: 2c6d940]
ammallya pushed a commit that referenced this pull request Oct 28, 2025
- #119
- #151
- #57
- #58
- #59
- #60
- #99
- #139
- #152
- #48
- #54
- #53
- #24
- #23
- #22
- #21
- #20
- #14
- #8

Change-Id: I1eea54cd1436f3ddbfd5c1b3b2f672eb81d03cd4


[ROCm/hip-tests commit: 96df1fd]
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.

7 participants