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

tril tests are not able to detect the right CPU level on Z #7204

Open
dchopra001 opened this issue Dec 13, 2023 · 0 comments
Open

tril tests are not able to detect the right CPU level on Z #7204

dchopra001 opened this issue Dec 13, 2023 · 0 comments

Comments

@dchopra001
Copy link
Contributor

Removing a SKIP_ON_S390 check like the one below:

TR::VectorLength vl = std::get<1>(GetParam());
TR::DataTypes et = scalarOpcode.getType().getDataType();
SKIP_IF(vl > TR::NumVectorLengths, MissingImplementation) << "Vector length is not supported by the target platform";
SKIP_ON_S390(KnownBug) << "This test is currently disabled on Z platforms because not all Z platforms have vector support (issue #1843)";
SKIP_ON_S390X(KnownBug) << "This test is currently disabled on Z platforms because not all Z platforms have vector support (issue #1843)";
TR::ILOpCode vectorOpcode = OMR::ILOpCode::convertScalarToVector(scalarOpcode.getOpCodeValue(), vl);
ASSERT_NE(TR::BadILOp, vectorOpcode.getOpCodeValue());
TR::DataType elementType = vectorOpcode.getType().getVectorElementType();

Results in Assertion failures on Z:

Assertion failed at /home/dchopra/openj9-openjdk-jdk17/omr/compiler/z/codegen/OMRInstruction.cpp:89:() cg->comp()->target().cpu.isAtLeast(_opcode.getMinimumALS())
	Processor detected (Unknown) does not support instruction VL

It looks like the processor is not detected properly. This is most likely happening because we call the default constructor for OMRCPU here:

TR::CPU
OMR::Z::CPU::detect(OMRPortLibrary * const omrPortLib)
{
if (omrPortLib == NULL)
return TR::CPU();
OMRPORT_ACCESS_FROM_OMRPORT(omrPortLib);
OMRProcessorDesc processorDescription;
omrsysinfo_get_processor_description(&processorDescription);

The call to detect is made here:

char type[64];
std::snprintf(type, sizeof(type), "Vector%i%s", vectorSize(vl) * 8, TR::DataType::getName(elementType));
TR::CPU cpu = TR::CPU::detect(privateOmrPortLibrary);
bool platformSupport = TR::CodeGenerator::getSupportsOpCodeForAutoSIMD(&cpu, loadOp) &&

Is privateOmrPortLibrary expected to be null here?

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