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

prm/image not disabled even if IMAGE not supported by the Agent #19

Open
pjaaskel opened this issue Feb 25, 2016 · 0 comments
Open

prm/image not disabled even if IMAGE not supported by the Agent #19

pjaaskel opened this issue Feb 25, 2016 · 0 comments

Comments

@pjaaskel
Copy link

There is a bit logic error in figuring out whether the IMAGE extension is supported by the system/agent. However, even if I fixed it by the patch below, it still wants to run prm/image for my implementation which doesn't support the IMAGE ext.

diff --git a/src/hexl/hexl_hsaruntime/HsailRuntime.cpp b/src/hexl/hexl_hsaruntime/HsailRuntime.cpp
index b3d9703..d69241b 100644
--- a/src/hexl/hexl_hsaruntime/HsailRuntime.cpp
+++ b/src/hexl/hexl_hsaruntime/HsailRuntime.cpp
@@ -1215,9 +1215,9 @@ void HsailRuntimeContext::PrintSystemInfo(std::ostream& out)
                    hsa_system_get_info(HSA_SYSTEM_INFO_EXTENSIONS, extensionMask));
   out << "Extensions:" << std::endl;
   out << '\t' << "Finalizer: "
-      << ((1<<0 | extensionMask[0]) ? "supported" : "not supported") << std::endl;
+      << ((1<<0 & extensionMask[0]) ? "supported" : "not supported") << std::endl;
   out << '\t' << "Images: "
-      << ((1<<1 | extensionMask[0]) ? "supported" : "not supported") << std::endl;
+      << ((1<<1 & extensionMask[0]) ? "supported" : "not supported") << std::endl;
 }

 static hsa_status_t IterateAgentsPrint(hsa_agent_t agent, void* data)
@@ -1411,9 +1411,9 @@ void HsailRuntimeContext::PrintAgentInfo(std::ostream& out, hsa_agent_t agent)
                    hsa_agent_get_info(agent, HSA_AGENT_INFO_EXTENSIONS, extensionMask));
   out << "Extensions:" << std::endl;
   out << '\t' << "Finalizer: "
-      << ((1<<0 | extensionMask[0]) ? "supported" : "not supported") << std::endl;
+      << ((1<<0 & extensionMask[0]) ? "supported" : "not supported") << std::endl;
   out << '\t' << "Images: "
-      << ((1<<1 | extensionMask[0]) ? "supported" : "not supported") << std::endl;
+      << ((1<<1 & extensionMask[0]) ? "supported" : "not supported") << std::endl;

   uint16_t versionMajor;
   CHECK_HSA_STATUS("hsa_agent_get_info failed",
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

No branches or pull requests

1 participant