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

[ur] Remove null adapter default load #261

Merged
merged 2 commits into from
Feb 15, 2023

Conversation

veselypeta
Copy link
Contributor

No description provided.

@veselypeta veselypeta force-pushed the petr/fix-test-interface branch from d1b6bbd to af59031 Compare February 14, 2023 15:42
test/conformance/source/environment.cpp Outdated Show resolved Hide resolved
.github/workflows/cmake.yml Outdated Show resolved Hide resolved
@veselypeta veselypeta force-pushed the petr/fix-test-interface branch 3 times, most recently from 3fdebfb to b23004b Compare February 14, 2023 16:39
@veselypeta veselypeta force-pushed the petr/fix-test-interface branch from b23004b to 2ec1153 Compare February 14, 2023 16:59
Comment on lines 24 to 39
static const char *knownAdaptersNames[] = {
MAKE_LIBRARY_NAME("ur_null", UR_VERSION),
};

std::vector<PlatformLibraryPath> discoverEnabledPlatforms() {
std::vector<PlatformLibraryPath> enabledPlatforms;

// UR_ADAPTERS_FORCE_LOAD is for development/debug only
char *altPlatforms = nullptr;
_dupenv_s(&altPlatforms, NULL, "UR_ADAPTERS_FORCE_LOAD");

if (altPlatforms == nullptr) {
for (auto libName : knownAdaptersNames) {
enabledPlatforms.emplace_back(libName);
}
} else {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately I had to remove knownAdaptersNames from the windows build as the MSVC compiler is quite picky about zero-length arrays. Perhaps I should remove from linux equivalent too?

Copy link
Member

Choose a reason for hiding this comment

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

You could use std::array. zero-length std:array is well defined so Windows should not complain. But if we don't have any adapters yet removing it will work as well I guess.

Copy link
Contributor

@pbalcer pbalcer Feb 15, 2023

Choose a reason for hiding this comment

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

Yea, I wouldn't worry about removing this if you need to - this code needs to be refactored anyway.

@pbalcer pbalcer merged commit 53fb5e8 into oneapi-src:main Feb 15, 2023
@veselypeta veselypeta deleted the petr/fix-test-interface branch April 12, 2023 10:51
winstonzhang-intel added a commit to winstonzhang-intel/llvm that referenced this pull request Jan 28, 2025
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.

4 participants