Skip to content

Conversation

@jjfumero
Copy link
Contributor

@jjfumero jjfumero commented Jul 3, 2024

Description

Extension of the prebuilt API to be able to load prebuilt kernels stored in JAR files.

Example:

 TaskGraph taskGraph = new TaskGraph("reftg")
      .transferToDevice(DataTransferMode.EVERY_EXECUTION, problemDimensions, problemParameters, doubleTimes, doubleValues, doubleWeights,  doubleFreqs, tsIdPerFreq)
	.prebuiltTask("t1",             // task name
		"sampleKernel",         // kernel nme
                  MyJavaClass.class,   // class accessible from the JAR file that contains the resource 
		"myKernel.ptx",          // name of the kernel file
		new Object[] { problemDimensions, problemParameters, doubleTimes, doubleValues, doubleWeights,  doubleFreqs, tsIdPerFreq, doubleAmplitudes, doubleDebug }, //
		new Access[] { Access.READ_ONLY, Access.READ_ONLY, Access.READ_ONLY,Access.READ_ONLY,Access.READ_ONLY, Access.READ_ONLY, Access.READ_ONLY, Access.WRITE_ONLY, Access.WRITE_ONLY }, //
		preferredDevice, //
		new int[] { nThreads })
         .transferToHost(DataTransferMode.EVERY_EXECUTION, doubleAmplitudes, doubleDebug);

This API access is required by GAIA for the project AERO. We may also simplify this API in future versions, since the main purpose was for debugging, not for running production code.

Problem description

If the patch provides a fix for a bug, please describe what was the issue and how to reproduce the issue.

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?

This change has been tested in the GAIA code base.

make
make tests

@jjfumero jjfumero added API feature New feature proposal labels Jul 3, 2024
@jjfumero jjfumero self-assigned this Jul 3, 2024
@jjfumero
Copy link
Contributor Author

jjfumero commented Jul 5, 2024

I am going to convert this to a draft PR because this extension might go well after PR #487

@jjfumero jjfumero marked this pull request as draft July 5, 2024 07:11
@jjfumero
Copy link
Contributor Author

I am closing this PR. Instead, the new version is available in #505

@jjfumero jjfumero closed this Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API feature New feature proposal

Projects

Development

Successfully merging this pull request may close these issues.

1 participant