CUDARequirement validation error with latest cwltool

Hi everyone,

Apologies if this has been asked before, but I couldn’t find any information on it.

I’m working with CWL and CUDARequirement, and I’ve noticed a validation issue when using the latest version of cwltool (3.1.20250715140722). Even with --enable-ext, validation fails:

cwltool --validate --enable-ext my-file/dummy.cwl 
INFO /usr/bin/cwltool 3.1.20250715140722
INFO Resolved 'my-file/dummy.cwl' to 'file:///<path-to>/my-file/dummy.cwl'
ERROR Tool definition failed initialization:
Tool definition file:///<path-to>/my-file/dummy.cwl#dummy-tool-1 failed validation:
my-file/dummy.cwl:28:3:   checking object 'my-file/dummy.cwl#dummy-tool-1'
my-file/dummy.cwl:30:3:     checking field 'requirements'
my-file/dummy.cwl:31:5:       checking item
                                Field 'class' contains undefined reference to
                                'http://commonwl.org/cwltool#CUDARequirement'

When I try with an earlier version of cwltool (3.1.20240708091337), the same file validates successfully:

INFO /usr/bin/cwltool 3.1.20240708091337
INFO Resolved 'my-file/dummy.cwl' to 'file:///<path-to>/my-file/dummy.cwl'
my-file/dummy.cwl is valid CWL.

Here’s the relevant part of my configuration:

$namespaces:
  s: https://schema.org/
  cwltool: "http://commonwl.org/cwltool#"

- class: CommandLineTool
  id: dummy-tool-1
  requirements:
    cwltool:CUDARequirement:
      cudaComputeCapability: '3.0'
      cudaDeviceCountMax: 8
      cudaDeviceCountMin: 1
      cudaVersionMin: '11.4'

I also tried running with CWL v1.0, v1.1, and v1.2, and in all cases I get the same validation error.

From testing, it looks like the last working version is 3.1.20240708091337. The error first appears starting from release 3.1.20240909164951.

Is this expected behavior (something changed in how CUDARequirement is handled), or am I missing something in my setup? Or could this be a regression/bug introduced in the newer versions ?

Thanks in advance for any guidance!

I guess it’s the same as this issue: CWL validation error for CUDARequirement · Issue #2114 · common-workflow-language/cwltool · GitHub