![]() XlaRuntimeError: UNIMPLEMENTED: DefaultDeviceAssignment not supported for Metal Client. > 817 xb.get_backend(backend).get_default_device_assignment(1)) XlaRuntimeError Traceback (most recent call last)ġ3 jax_x_cpu = jax.device_put(jnp.array(x), jax.devices('cpu'))ġ5 jax_f_gpu = jax.jit(f, backend='METAL')įile ~/.virtualenvs/jax-metal/lib/python3.11/site-packages/jax/_src/pjit.py:817, in _create_sharding_with_device_backend(device, backend) Jax_x_cpu = jax.device_put(jnp.array(x), jax.devices('cpu')) Jax_x_gpu = jax.device_put(jnp.array(x), jax.devices('METAL')) Hi everyone, I'm trying to test some functionality of jax-metal and got this error. I tested the same code in a colab environment and the result was as expectedĪnd this is correct and consistent with the documentation Which is obviously wrong at every passage Print("Final Sorted Indices:", sorted_indices.numpy()) Sorted_indices = multi_column_argsort(points, columns_order) To test this I used the following example: Print("Sorted Indices After:", sorted_indices.numpy())Īfter debugging this function for a while I found out that it was not sorting the 3 columns as expected because the argsort were not stable i.e. Sorted_indices = tf.gather(sorted_indices, col_argsort) Print("Sorted Indices Before:", sorted_indices.numpy()) Print("Col Argsort:", col_argsort.numpy()) ![]() Print("Column Values:", col_vals.numpy()) Sorted_indices = tf.range(start=0, limit=tf.shape(tensor), dtype=tf.int32)Ĭol_vals = tf.gather(tensor, sorted_indices)Ĭol_argsort = tf.argsort(col_vals, stable=True) So I implemented the following function:ĭef multi_column_argsort(tensor, columns_order): For a tensorflow layer I need a multi column argsort.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |