hsail test case failures in the latest tip, mathSubstitutions

Doug Simon doug.simon at oracle.com
Fri Oct 25 05:12:49 PDT 2013


Sorry for the delay in responding. I've pushed some changes that should answer your questions:

http://hg.openjdk.java.net/graal/graal/rev/3b178baf3edb

The tests still don't completely work since the thread register for HSAIL is not yet defined:

$ mx --vm server unittest -G:+InlineEverything -G:+RemoveNeverExecutedCode StaticNBodyCallTest StringContainsAcceptTest
executing junit tests now... (2 test classes)
JUnit version 4.8

Time: 0.686
There were 2 failures:
1) test(com.oracle.graal.compiler.hsail.test.StaticNBodyCallTest)
com.oracle.graal.graph.GraalInternalError: java.lang.AssertionError: thread register is not defined
	at node: 195|ForeignCall#createOutOfBoundsException(int)Object
	at com.oracle.graal.compiler.gen.LIRGenerator.doBlock(LIRGenerator.java:374)
	at com.oracle.graal.compiler.GraalCompiler$6.emitBlock(GraalCompiler.java:271)
	at com.oracle.graal.compiler.GraalCompiler$6.run(GraalCompiler.java:258)
	at com.oracle.graal.debug.internal.DebugScope.executeScope(DebugScope.java:258)
	at com.oracle.graal.debug.internal.DebugScope.scope(DebugScope.java:245)
	at com.oracle.graal.debug.Debug.scope(Debug.java:164)
	at com.oracle.graal.debug.Debug.scope(Debug.java:159)
	at com.oracle.graal.compiler.GraalCompiler.emitLIR(GraalCompiler.java:254)
	at com.oracle.graal.compiler.GraalCompiler$3.call(GraalCompiler.java:168)
	at com.oracle.graal.compiler.GraalCompiler$3.call(GraalCompiler.java:1)
	at com.oracle.graal.debug.internal.DebugScope.call(DebugScope.java:383)
	at com.oracle.graal.debug.internal.DebugScope.executeScope(DebugScope.java:261)
	at com.oracle.graal.debug.internal.DebugScope.scope(DebugScope.java:245)
	at com.oracle.graal.debug.Debug.scope(Debug.java:184)
	at com.oracle.graal.debug.Debug.scope(Debug.java:179)
	at com.oracle.graal.compiler.GraalCompiler.compileGraphNoScope(GraalCompiler.java:165)
	at com.oracle.graal.compiler.GraalCompiler$1.run(GraalCompiler.java:141)
	at com.oracle.graal.debug.internal.DebugScope.executeScope(DebugScope.java:258)
	at com.oracle.graal.debug.internal.DebugScope.scope(DebugScope.java:245)
	at com.oracle.graal.debug.Debug.scope(Debug.java:164)
	at com.oracle.graal.compiler.GraalCompiler.compileGraph(GraalCompiler.java:138)
	at com.oracle.graal.hotspot.hsail.HSAILCompilationResult.getHSAILCompilationResult(HSAILCompilationResult.java:146)
	at com.oracle.graal.hotspot.hsail.HSAILCompilationResult.getHSAILCompilationResult(HSAILCompilationResult.java:104)
	at com.oracle.graal.hotspot.hsail.HSAILCompilationResult.getHSAILCompilationResult(HSAILCompilationResult.java:96)
	at com.oracle.graal.compiler.hsail.test.infra.GraalKernelTester.getCompiledHSAILSource(GraalKernelTester.java:46)
	at com.oracle.graal.compiler.hsail.test.infra.KernelTester.getHSAILSource(KernelTester.java:486)
	at com.oracle.graal.compiler.hsail.test.infra.KernelTester.createOkraKernel(KernelTester.java:507)
	at com.oracle.graal.compiler.hsail.test.infra.KernelTester.dispatchKernelOkra(KernelTester.java:534)
	at com.oracle.graal.compiler.hsail.test.infra.KernelTester.dispatchMethodKernelOkra(KernelTester.java:586)
	at com.oracle.graal.compiler.hsail.test.infra.KernelTester.dispatchMethodKernel(KernelTester.java:364)
	at com.oracle.graal.compiler.hsail.test.StaticNBodyTest.runTest(StaticNBodyTest.java:96)
	at com.oracle.graal.compiler.hsail.test.infra.KernelTester.compareOkraToSeq(KernelTester.java:711)
	at com.oracle.graal.compiler.hsail.test.infra.KernelTester.compareOkraToSeq(KernelTester.java:696)
	at com.oracle.graal.compiler.hsail.test.infra.KernelTester.testGeneratedHsail(KernelTester.java:717)
	at com.oracle.graal.compiler.hsail.test.StaticNBodyCallTest.test(StaticNBodyCallTest.java:44)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:24)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
	at org.junit.runner.JUnitCore.runMain(JUnitCore.java:98)
	at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:53)
	at org.junit.runner.JUnitCore.main(JUnitCore.java:45)
	at JUnitWrapper.main(JUnitWrapper.java:75)
Caused by: java.lang.AssertionError: thread register is not defined
	at com.oracle.graal.hotspot.meta.HotSpotRegisters.getThreadRegister(HotSpotRegisters.java:40)
	at com.oracle.graal.hotspot.stubs.ForeignCallStub.getGraph(ForeignCallStub.java:229)
	at com.oracle.graal.hotspot.stubs.Stub$1.run(Stub.java:143)
	at com.oracle.graal.debug.internal.DebugScope.executeScope(DebugScope.java:258)
	at com.oracle.graal.debug.internal.DebugScope.scope(DebugScope.java:245)
	at com.oracle.graal.debug.Debug.sandbox(Debug.java:127)
	at com.oracle.graal.hotspot.stubs.Stub.getCode(Stub.java:138)
	at com.oracle.graal.hotspot.HotSpotForeignCallLinkage.finalizeAddress(HotSpotForeignCallLinkage.java:231)
	at com.oracle.graal.hotspot.meta.HotSpotForeignCallsProviderImpl.lookupForeignCall(HotSpotForeignCallsProviderImpl.java:139)
	at com.oracle.graal.hotspot.hsail.HSAILHotSpotForeignCallsProvider.lookupForeignCall(HSAILHotSpotForeignCallsProvider.java:42)
	at com.oracle.graal.hotspot.hsail.HSAILHotSpotForeignCallsProvider.lookupForeignCall(HSAILHotSpotForeignCallsProvider.java:1)
	at com.oracle.graal.nodes.extended.ForeignCallNode.generate(ForeignCallNode.java:82)
	at com.oracle.graal.compiler.gen.LIRGenerator.emitNode(LIRGenerator.java:436)
	at com.oracle.graal.compiler.gen.LIRGenerator.doRoot(LIRGenerator.java:425)
	at com.oracle.graal.compiler.gen.LIRGenerator.doBlock(LIRGenerator.java:370)
	... 65 more
2) test(com.oracle.graal.compiler.hsail.test.StringContainsAcceptTest)
com.oracle.graal.graph.GraalInternalError: java.lang.AssertionError: thread register is not defined
	at node: 312|ForeignCall#createOutOfBoundsException(int)Object
	at com.oracle.graal.compiler.gen.LIRGenerator.doBlock(LIRGenerator.java:374)
	at com.oracle.graal.compiler.GraalCompiler$6.emitBlock(GraalCompiler.java:271)
	at com.oracle.graal.compiler.GraalCompiler$6.run(GraalCompiler.java:258)
	at com.oracle.graal.debug.internal.DebugScope.executeScope(DebugScope.java:258)
	at com.oracle.graal.debug.internal.DebugScope.scope(DebugScope.java:245)
	at com.oracle.graal.debug.Debug.scope(Debug.java:164)
	at com.oracle.graal.debug.Debug.scope(Debug.java:159)
	at com.oracle.graal.compiler.GraalCompiler.emitLIR(GraalCompiler.java:254)
	at com.oracle.graal.compiler.GraalCompiler$3.call(GraalCompiler.java:168)
	at com.oracle.graal.compiler.GraalCompiler$3.call(GraalCompiler.java:1)
	at com.oracle.graal.debug.internal.DebugScope.call(DebugScope.java:383)
	at com.oracle.graal.debug.internal.DebugScope.executeScope(DebugScope.java:261)
	at com.oracle.graal.debug.internal.DebugScope.scope(DebugScope.java:245)
	at com.oracle.graal.debug.Debug.scope(Debug.java:184)
	at com.oracle.graal.debug.Debug.scope(Debug.java:179)
	at com.oracle.graal.compiler.GraalCompiler.compileGraphNoScope(GraalCompiler.java:165)
	at com.oracle.graal.compiler.GraalCompiler$1.run(GraalCompiler.java:141)
	at com.oracle.graal.debug.internal.DebugScope.executeScope(DebugScope.java:258)
	at com.oracle.graal.debug.internal.DebugScope.scope(DebugScope.java:245)
	at com.oracle.graal.debug.Debug.scope(Debug.java:164)
	at com.oracle.graal.compiler.GraalCompiler.compileGraph(GraalCompiler.java:138)
	at com.oracle.graal.hotspot.hsail.HSAILCompilationResult.getHSAILCompilationResult(HSAILCompilationResult.java:146)
	at com.oracle.graal.hotspot.hsail.HSAILCompilationResult.getHSAILCompilationResult(HSAILCompilationResult.java:104)
	at com.oracle.graal.hotspot.hsail.HSAILCompilationResult.getHSAILCompilationResult(HSAILCompilationResult.java:96)
	at com.oracle.graal.compiler.hsail.test.infra.GraalKernelTester.getCompiledHSAILSource(GraalKernelTester.java:46)
	at com.oracle.graal.compiler.hsail.test.infra.KernelTester.getHSAILSource(KernelTester.java:486)
	at com.oracle.graal.compiler.hsail.test.infra.KernelTester.createOkraKernel(KernelTester.java:507)
	at com.oracle.graal.compiler.hsail.test.infra.KernelTester.dispatchKernelOkra(KernelTester.java:534)
	at com.oracle.graal.compiler.hsail.test.infra.KernelTester.dispatchMethodKernelOkra(KernelTester.java:592)
	at com.oracle.graal.compiler.hsail.test.infra.KernelTester.dispatchMethodKernel(KernelTester.java:364)
	at com.oracle.graal.compiler.hsail.test.StringContainsAcceptTest.runTest(StringContainsAcceptTest.java:46)
	at com.oracle.graal.compiler.hsail.test.infra.KernelTester.compareOkraToSeq(KernelTester.java:711)
	at com.oracle.graal.compiler.hsail.test.infra.KernelTester.compareOkraToSeq(KernelTester.java:696)
	at com.oracle.graal.compiler.hsail.test.infra.KernelTester.testGeneratedHsail(KernelTester.java:717)
	at com.oracle.graal.compiler.hsail.test.StringContainsAcceptTest.test(StringContainsAcceptTest.java:54)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:24)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
	at org.junit.runner.JUnitCore.runMain(JUnitCore.java:98)
	at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:53)
	at org.junit.runner.JUnitCore.main(JUnitCore.java:45)
	at JUnitWrapper.main(JUnitWrapper.java:75)
Caused by: java.lang.AssertionError: thread register is not defined
	at com.oracle.graal.hotspot.meta.HotSpotRegisters.getThreadRegister(HotSpotRegisters.java:40)
	at com.oracle.graal.hotspot.stubs.ForeignCallStub.getGraph(ForeignCallStub.java:229)
	at com.oracle.graal.hotspot.stubs.Stub$1.run(Stub.java:143)
	at com.oracle.graal.debug.internal.DebugScope.executeScope(DebugScope.java:258)
	at com.oracle.graal.debug.internal.DebugScope.scope(DebugScope.java:245)
	at com.oracle.graal.debug.Debug.sandbox(Debug.java:127)
	at com.oracle.graal.hotspot.stubs.Stub.getCode(Stub.java:138)
	at com.oracle.graal.hotspot.HotSpotForeignCallLinkage.finalizeAddress(HotSpotForeignCallLinkage.java:231)
	at com.oracle.graal.hotspot.meta.HotSpotForeignCallsProviderImpl.lookupForeignCall(HotSpotForeignCallsProviderImpl.java:139)
	at com.oracle.graal.hotspot.hsail.HSAILHotSpotForeignCallsProvider.lookupForeignCall(HSAILHotSpotForeignCallsProvider.java:42)
	at com.oracle.graal.hotspot.hsail.HSAILHotSpotForeignCallsProvider.lookupForeignCall(HSAILHotSpotForeignCallsProvider.java:1)
	at com.oracle.graal.nodes.extended.ForeignCallNode.generate(ForeignCallNode.java:82)
	at com.oracle.graal.compiler.gen.LIRGenerator.emitNode(LIRGenerator.java:436)
	at com.oracle.graal.compiler.gen.LIRGenerator.doRoot(LIRGenerator.java:425)
	at com.oracle.graal.compiler.gen.LIRGenerator.doBlock(LIRGenerator.java:370)
	... 65 more

FAILURES!!!
Tests run: 2,  Failures: 2

-Doug

On Oct 23, 2013, at 7:06 PM, "Deneau, Tom" <tom.deneau at amd.com> wrote:

> Doug or others --
> 
> Vasanth is out this week so I am trying to get the HSAIL backend working with this new infrastructure.
> 
> A specific problem we are having, previously we had a replacement for Math.sqrt(double) to MathSubstitutionsX86.sqrt(double) which was I think just inherited from AMD64HotSpotRuntime.  (In the HSAIL LIR and assembler then, we emitted the HSAIL instruction from the MathIntrinsicNode).
> 
> What is the right way to get just that one substitution working in the new framework?  (Once we get that working, we can then add additional substitutions as needed).
> 
> I can see that HSAILHotSpotReplacementsUtil needs some methods to be implemented (perhaps deferring to its parent), but for the substitution class itself, am not sure of whether new files should be created, or we should reuse existing MathSubstitutions.
> 
> -- Tom
> 
> 
> -----Original Message-----
> From: graal-dev-bounces at openjdk.java.net [mailto:graal-dev-bounces at openjdk.java.net] On Behalf Of Doug Simon
> Sent: Tuesday, October 22, 2013 4:36 AM
> To: Venkatachalam, Vasanth
> Cc: graal-dev at openjdk.java.net
> Subject: Re: hsail test case failures in the latest tip
> 
> As indicated by the exceptions raised by these tests (e.g., below), you need to fix the incomplete/incorrect HSAILLIRGenerator and HSAILHotSpotForeignCallsProvider classes.
> 
> -Doug
> 
> 1) test(com.oracle.graal.compiler.hsail.test.StaticNBodyCallTest)
> com.oracle.graal.graph.GraalInternalError: unimplemented
> 	at node: 504|Invoke#Direct#sqrt
> 	at com.oracle.graal.graph.GraalInternalError.unimplemented(GraalInternalError.java:38)
> 	at com.oracle.graal.compiler.hsail.HSAILLIRGenerator.emitDirectCall(HSAILLIRGenerator.java:553)
> 	at com.oracle.graal.compiler.gen.LIRGenerator.emitInvoke(LIRGenerator.java:579)
> 	at com.oracle.graal.nodes.InvokeWithExceptionNode.generate(InvokeWithExceptionNode.java:137)
> 	at com.oracle.graal.compiler.gen.LIRGenerator.emitNode(LIRGenerator.java:387)
> 	at com.oracle.graal.compiler.gen.LIRGenerator.doRoot(LIRGenerator.java:376)
> 	at com.oracle.graal.compiler.gen.LIRGenerator.doBlock(LIRGenerator.java:327)
> 	at com.oracle.graal.compiler.GraalCompiler$3.emitBlock(GraalCompiler.java:259)
> 	at com.oracle.graal.compiler.GraalCompiler$3.run(GraalCompiler.java:246)
> 	at com.oracle.graal.debug.internal.DebugScope.executeScope(DebugScope.java:258)
> 	at com.oracle.graal.debug.internal.DebugScope.scope(DebugScope.java:245)
> 	at com.oracle.graal.debug.Debug.scope(Debug.java:164)
> 	at com.oracle.graal.debug.Debug.scope(Debug.java:159)
> 	at com.oracle.graal.compiler.GraalCompiler.emitLIR(GraalCompiler.java:242)
> 	at com.oracle.graal.compiler.GraalCompiler$1$2.call(GraalCompiler.java:154)
> 	at com.oracle.graal.compiler.GraalCompiler$1$2.call(GraalCompiler.java:1)
> 	at com.oracle.graal.debug.internal.DebugScope.call(DebugScope.java:383)
>        ...
> 2) test(com.oracle.graal.compiler.hsail.test.StringContainsAcceptTest)
> com.oracle.graal.graph.GraalInternalError: unimplemented: createOutOfBoundsException(int)Object
> 	at node: 312|ForeignCall#createOutOfBoundsException(int)Object
> 	at com.oracle.graal.graph.GraalInternalError.unimplemented(GraalInternalError.java:42)
> 	at com.oracle.graal.hotspot.hsail.HSAILHotSpotForeignCallsProvider.lookupForeignCall(HSAILHotSpotForeignCallsProvider.java:52)
> 	at com.oracle.graal.nodes.extended.ForeignCallNode.generate(ForeignCallNode.java:82)
> 	at com.oracle.graal.compiler.gen.LIRGenerator.emitNode(LIRGenerator.java:387)
> 	at com.oracle.graal.compiler.gen.LIRGenerator.doRoot(LIRGenerator.java:376)
> 	at com.oracle.graal.compiler.gen.LIRGenerator.doBlock(LIRGenerator.java:327)
> 	at com.oracle.graal.compiler.GraalCompiler$3.emitBlock(GraalCompiler.java:259)
> 	at com.oracle.graal.compiler.GraalCompiler$3.run(GraalCompiler.java:246)
>        ...
> 
> On Oct 22, 2013, at 5:02 AM, "Venkatachalam, Vasanth" <Vasanth.Venkatachalam at amd.com> wrote:
> 
>> Doug,
>> 
>> Please try running with -G:+InlineEverything  -G:-RemoveNeverExecutedCode 
>> 
>> Vasanth
>> 
>> -----Original Message-----
>> From: Doug Simon [mailto:doug.simon at oracle.com] 
>> Sent: Monday, October 21, 2013 1:16 PM
>> To: Venkatachalam, Vasanth
>> Cc: graal-dev at openjdk.java.net
>> Subject: Re: hsail test case failures in the latest tip
>> 
>> Can you please tell me how to reproduce the failures. They passed the gate as seem to pass when I run them locally:
>> 
>> $ mx --vm server unittest StaticNBodyCallTest StringContainsAcceptTest executing junit tests now... (2 test classes) JUnit version 4.8 ..
>> Time: 0.009
>> 
>> OK (2 tests)
>> 
>> -Doug
>> 
>> On Oct 21, 2013, at 7:21 PM, "Venkatachalam, Vasanth" <Vasanth.Venkatachalam at amd.com> wrote:
>> 
>>> Doug-
>>> 
>>> There are a couple of HSAIL test cases that are failing on the latest tip, namely hsail.test.StaticNBodyCallTest and hsail.test.StringContainsAcceptTest.
>>> These test cases were passing as of rev 12895, which was uploaded around a week before the refactoring changes that you checked in.
>>> 
>>> Can you examine which got checked in that's causing these tests to fail?
>>> 
>>> Vasanth
>>> 
>>> 
>>> 
>> 
>> 
>> 
> 
> 
> 



More information about the graal-dev mailing list