{"action":"created","issue":{"url":"https://api.github.com/repos/deeplearning4j/nd4j/issues/756","repository_url":"https://api.github.com/repos/deeplearning4j/nd4j","labels_url":"https://api.github.com/repos/deeplearning4j/nd4j/issues/756/labels{/name}","comments_url":"https://api.github.com/repos/deeplearning4j/nd4j/issues/756/comments","events_url":"https://api.github.com/repos/deeplearning4j/nd4j/issues/756/events","html_url":"https://github.com/deeplearning4j/nd4j/issues/756","id":144720668,"number":756,"title":"Multiple backends issue","user":{"login":"raver119","id":12250879,"avatar_url":"https://avatars.githubusercontent.com/u/12250879?v=3","gravatar_id":"","url":"https://api.github.com/users/raver119","html_url":"https://github.com/raver119","followers_url":"https://api.github.com/users/raver119/followers","following_url":"https://api.github.com/users/raver119/following{/other_user}","gists_url":"https://api.github.com/users/raver119/gists{/gist_id}","starred_url":"https://api.github.com/users/raver119/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raver119/subscriptions","organizations_url":"https://api.github.com/users/raver119/orgs","repos_url":"https://api.github.com/users/raver119/repos","events_url":"https://api.github.com/users/raver119/events{/privacy}","received_events_url":"https://api.github.com/users/raver119/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/deeplearning4j/nd4j/labels/enhancement","name":"enhancement","color":"000080"}],"state":"open","locked":false,"assignee":{"login":"saudet","id":3328023,"avatar_url":"https://avatars.githubusercontent.com/u/3328023?v=3","gravatar_id":"","url":"https://api.github.com/users/saudet","html_url":"https://github.com/saudet","followers_url":"https://api.github.com/users/saudet/followers","following_url":"https://api.github.com/users/saudet/following{/other_user}","gists_url":"https://api.github.com/users/saudet/gists{/gist_id}","starred_url":"https://api.github.com/users/saudet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saudet/subscriptions","organizations_url":"https://api.github.com/users/saudet/orgs","repos_url":"https://api.github.com/users/saudet/repos","events_url":"https://api.github.com/users/saudet/events{/privacy}","received_events_url":"https://api.github.com/users/saudet/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2016-03-30T21:09:11Z","updated_at":"2016-04-25T04:20:46Z","closed_at":null,"body":"Right now, when using javacpp if two backends are specified in pom.xml, only the first one gets loaded and used. In both native cpu and cuda backends, target resource name is still jniNativeOps.\r\n\r\nAnd since it would be nice to have different backends loaded at the same time, what workaround can we have there?\r\n\r\nHere's how it works right now: https://github.com/deeplearning4j/nd4j/blob/0abcdf5d0493126506798c5ff057544495b7fd34/nd4j-backends/nd4j-api-parent/nd4j-native-api/src/main/java/org/nd4j/nativeblas/NativeOps.java#L15-L19\r\n\r\nAnd javacpp Loader is scanning classpath for first target binary occurence: jniNativeOps.dll for example.\r\n\r\np.s. with maven-shade situation will become worse, if someone will have two backends at the same time, since two out of three backend binaries share name and they share common package name.\r\n\r\n@saudet what would be the best solution here, from JavaCPP point of view?"},"comment":{"url":"https://api.github.com/repos/deeplearning4j/nd4j/issues/comments/214122871","html_url":"https://github.com/deeplearning4j/nd4j/issues/756#issuecomment-214122871","issue_url":"https://api.github.com/repos/deeplearning4j/nd4j/issues/756","id":214122871,"user":{"login":"saudet","id":3328023,"avatar_url":"https://avatars.githubusercontent.com/u/3328023?v=3","gravatar_id":"","url":"https://api.github.com/users/saudet","html_url":"https://github.com/saudet","followers_url":"https://api.github.com/users/saudet/followers","following_url":"https://api.github.com/users/saudet/following{/other_user}","gists_url":"https://api.github.com/users/saudet/gists{/gist_id}","starred_url":"https://api.github.com/users/saudet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saudet/subscriptions","organizations_url":"https://api.github.com/users/saudet/orgs","repos_url":"https://api.github.com/users/saudet/repos","events_url":"https://api.github.com/users/saudet/events{/privacy}","received_events_url":"https://api.github.com/users/saudet/received_events","type":"User","site_admin":false},"created_at":"2016-04-25T04:20:46Z","updated_at":"2016-04-25T04:20:46Z","body":"In the end, do we need to be able to use two backends simultaneously?"}}