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

Fix recompilation when batch processing is not triggered #447

Merged
merged 5 commits into from
Jun 11, 2024

Conversation

jjfumero
Copy link
Member

Description

This patch provides a fix to avoid continuous recompilation of execution plans that do not use batch processing.
TornadoVM was set to recompile every time, but we only need to recompile under certain conditions only when using batch processing, or when changing the device.

Side note: We need the benchmarking suite for the AERO project.

Problem description

The issue was that the benchmark suite, and therefore, user code, can trigger recompilation over and over again due to a condition for batch processing.

Backend/s tested

Mark the backends affected by this PR.

  • OpenCL
  • PTX
  • SPIRV

OS tested

Mark the OS where this PR is tested.

  • Linux
  • OSx
  • Windows

Did you check on FPGAs?

If it is applicable, check your changes on FPGAs.

  • Yes
  • No

How to test the new patch?

$ tornado --enableProfiler console -m tornado.benchmarks/uk.ac.manchester.tornado.benchmarks.BenchmarkRunner blackscholes

$ tornado-test -V uk.ac.manchester.tornado.unittests.batches.TestBatches

Test: class uk.ac.manchester.tornado.unittests.batches.TestBatches
	Running test: testSameInputSizeAndTypeRestriction ................  [PASS] 
	Running test: test100MBSmall             ................  [PASS] 
	Running test: test100MBSmallLazy         ................  [PASS] 
	Running test: test100MB                  ................  [PASS] 
	Running test: test100MBLazy              ................  [PASS] 
	Running test: test300MB                  ................  [PASS] 
	Running test: test300MBLazy              ................  [PASS] 
	Running test: test512MB                  ................  [PASS] 
	Running test: test512MBLazy              ................  [PASS] 
	Running test: test50MB                   ................  [PASS] 
	Running test: test50MBInteger            ................  [PASS] 
	Running test: test50MBShort              ................  [PASS] 
	Running test: test50MBDouble             ................  [PASS] 
	Running test: test50MBLong               ................  [PASS] 
	Running test: testSameInputSizeAndTypeRestrictionJavaArrays ................  [PASS] 
	Running test: testSameInputTypeRestriction ................  [PASS] 
	Running test: testSameInputTypeRestrictionJavaArrays ................  [PASS] 
	Running test: testSameInputSize          ................  [PASS] 
	Running test: testSameInputSizeJavaArrays ................  [PASS] 
	Running test: testSameInputSizeJavaToTornado ................  [PASS] 
	Running test: testSameInputSizeTornadoToJava ................  [PASS] 
	Running test: testSameInputSizeAndTypeJavaToTornado ................  [PASS] 
	Running test: testSameInputSizeAndTypeTornadoToJava ................  [PASS] 
	Running test: testBatchNotEven           ................  [PASS] 
	Running test: testBatchNotEven2          ................  [PASS] 
	Running test: testBatchNotEven2Lazy      ................  [PASS] 
	Running test: testBatchThreadIndex       ................  [PASS] 
Test ran: 27, Failed: 0, Unsupported: 0

@jjfumero jjfumero added runtime fix Provides a fix labels Jun 11, 2024
@jjfumero jjfumero requested review from mairooni and stratika June 11, 2024 07:21
@jjfumero jjfumero self-assigned this Jun 11, 2024
Copy link
Collaborator

@mairooni mairooni left a comment

Choose a reason for hiding this comment

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

LGTM

@jjfumero
Copy link
Member Author

Validation has been fixed too.

@jjfumero jjfumero merged commit 2c15aeb into beehive-lab:develop Jun 11, 2024
2 checks passed
@jjfumero jjfumero deleted the fix/benchmarks/compilation branch June 11, 2024 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Provides a fix runtime
Projects
Development

Successfully merging this pull request may close these issues.

3 participants