Skip to content

Commit

Permalink
[Tests] Fix extension in test case for apple targets. (#390)
Browse files Browse the repository at this point in the history
**Context:** Apple uses dylib

**Description of the Change:** Use dylib
  • Loading branch information
erick-xanadu committed Dec 5, 2023
1 parent 32197c1 commit bd3e25f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* Support for dynamically-shaped arrays has been added.
[(#366)](https://github.com/PennyLaneAI/catalyst/pull/366)
[(#386)](https://github.com/PennyLaneAI/catalyst/pull/385)
[(#390)](https://github.com/PennyLaneAI/catalyst/pull/390)

Catalyst now accepts tensors whose dimensions are not known at compile time.
Standard tensor initialisation functions `jax.numpy.ones`, `jnp.zeros`, and
Expand Down
5 changes: 4 additions & 1 deletion frontend/test/pytest/test_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ def test_compiler_driver_with_flags(self):
def test_compiler_from_textual_ir(self):
"""Test the textual IR compilation."""
full_path = get_lib_path("runtime", "RUNTIME_LIB_DIR")
extension = ".so" if platform.system() == "Linux" else ".dylib"

# pylint: disable=line-too-long
ir = (
Expand All @@ -281,7 +282,9 @@ def test_compiler_from_textual_ir(self):
quantum.device ["rtd_lib", """
+ r'"'
+ full_path
+ r"""/librtd_lightning.so"]
+ r"""/librtd_lightning"""
+ extension
+ """"]
%0 = stablehlo.constant dense<4> : tensor<i64>
%1 = quantum.alloc( 4) : !quantum.reg
%2 = stablehlo.constant dense<0> : tensor<i64>
Expand Down

0 comments on commit bd3e25f

Please sign in to comment.