Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119228 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 71704 invoked from network); 4 Jan 2023 23:13:46 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Jan 2023 23:13:46 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E111B1804D4 for ; Wed, 4 Jan 2023 15:13:44 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 4 Jan 2023 15:13:44 -0800 (PST) Received: by mail-ed1-f48.google.com with SMTP id i9so50711065edj.4 for ; Wed, 04 Jan 2023 15:13:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=kOnsCx1385/GeWvsjDQiTECSxewylRJ9iQMiCUDkV7g=; b=edtbSSK6Wph49XUMzpJTenow65MoudcfNn7Ng0f0/l6zY/pDmFk8O3dxRLSRuKgI0u efGUnTz0x3s0G2OyFwrXaxQ6FzYueN1kwQwgzm4OelmuHEFsn8hOgY1mDPGugVJMWUub PdvNkFsusS/E1DzK/iihluxTV94691KFivSpEDbZraEOBFAjHq+9kltjWqfAHEN2venE frnbrhGA4ewmBsCd+71+1blLNvKGCoIG5b/74j+XWBEZWXVx2A960X0dl+DLTLKShzXe pk59g0/5EziS41ObPQL/uPd8OU4FLsSoTWafkF5I8zaakcrUKfX04ndBcXf4+xjvKADS 3grQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kOnsCx1385/GeWvsjDQiTECSxewylRJ9iQMiCUDkV7g=; b=CJ4HPPA8FQyvfrGf93mqlnYdITekSaDyDE9VbmOguYGQOeYd/aTImWVICviKOiHvhk tMyLduAKHen5vuR8kFOEInrH3cUokJcucSh40t9YWcXuF8IPqJijDek4U9UOT1Q3YK6E FS7kp8D3gnSBOZbm3tCtKETdk1Q1p/978+rr+z0p4M4Bidg1val6Tc+uPw6AR5xlGLpx tHV/WqpwlZJq+ltpVFZVH6AhlGSQNa09PvkeUt4VJ2H7m/0si1Dw0YzV3XsKnudJ+joL dk6+kHla1to78KG8XELfdaZokZ/jH5CFbPPTBYX9BKC7TCJAFj6fDgIZNclOeSKwOfBH 5mGg== X-Gm-Message-State: AFqh2koC0D1jwtVn08je0pTFCVcGGr2bTWhSRSpCYetLz5JH4EYZlrhs piurc3rSJwvr6xtUuTYBSaNVabygwHFYT8oVQqg= X-Google-Smtp-Source: AMrXdXt6vNH265CKsrHMgGTH8yTscQv/iA0ZWxCA7M+vJM4+tCH4wOktgdpvIhfntNgzKO+bZ4v51P1HcgJT5qlngXo= X-Received: by 2002:a05:6402:c8a:b0:487:828a:718f with SMTP id cm10-20020a0564020c8a00b00487828a718fmr2176781edb.406.1672874022950; Wed, 04 Jan 2023 15:13:42 -0800 (PST) MIME-Version: 1.0 References: <93d820f0-aa43-3068-ce0e-0211993b20c7@gmx.de> In-Reply-To: Date: Wed, 4 Jan 2023 15:13:31 -0800 Message-ID: To: "Christoph M. Becker" Cc: PHP Internals Content-Type: multipart/alternative; boundary="000000000000e45ae005f1785564" Subject: Re: PHP support for matrix operations - BLAS, LAPACK. From: zardozrocks@gmail.com (j adams) --000000000000e45ae005f1785564 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I have supplied this information as issue #34 on the github project that appears to maintain the tensor extension. https://github.com/RubixML/Tensor/issues/34 I had commented on issue #33, where someone attempts to fix tensor for php 8.2 about 3 weeks ago, but there have been no responses: https://github.com/RubixML/Tensor/issues/33 It's surprisingly difficult to get fast matrix operations in PHP, given how fundamental they are to machine learning. On Sat, Dec 17, 2022 at 11:51 AM j adams wrote: > Christopher: > > I have carefully followed the instructions under 'Manually compiling the > extension' in your first link[1]. When I attempted `make`, it failed, > ending with the following errors. I'll be filing an issue. > > /home/jaith/biz/machine-learning/tensor/Tensor/ext/kernel/main.c: In > function =E2=80=98zephir_function_exists=E2=80=99: > /home/jaith/biz/machine-learning/tensor/Tensor/ext/kernel/main.c:285:101: > warning: comparison between pointer and integer > 285 | if (zend_hash_str_exists(CG(function_table), > Z_STRVAL_P(function_name), Z_STRLEN_P(function_name)) !=3D NULL) { > | > ^~ > /home/jaith/biz/machine-learning/tensor/Tensor/ext/kernel/main.c: In > function =E2=80=98zephir_function_exists_ex=E2=80=99: > /home/jaith/biz/machine-learning/tensor/Tensor/ext/kernel/main.c:301:76: > warning: comparison between pointer and integer > 301 | if (zend_hash_str_exists(CG(function_table), function_name, > function_len) !=3D NULL) { > | > ^~ > /home/jaith/biz/machine-learning/tensor/Tensor/ext/kernel/main.c: In > function =E2=80=98zephir_get_arg=E2=80=99: > /home/jaith/biz/machine-learning/tensor/Tensor/ext/kernel/main.c:571:9: > error: too many arguments to function =E2=80=98zend_forbid_dynamic_call= =E2=80=99 > 571 | if (zend_forbid_dynamic_call("func_get_arg()") =3D=3D FAILURE= ) { > | ^~~~~~~~~~~~~~~~~~~~~~~~ > In file included from /usr/include/php/20220829/main/php.h:35, > from > /home/jaith/biz/machine-learning/tensor/Tensor/ext/kernel/main.c:16: > /usr/include/php/20220829/Zend/zend_API.h:782:39: note: declared here > 782 | static zend_always_inline zend_result > zend_forbid_dynamic_call(void) > | ^~~~~~~~~~~~~~~~~~~~~~~~ > make: *** [Makefile:213: kernel/main.lo] Error 1 > > > [1] > > On Tue, Dec 6, 2022 at 6:29 AM Christoph M. Becker > wrote: > >> On 05.12.2022 at 20:05, j adams wrote: >> >> > Christoph, thanks for this tip. >> > >> > Unfortunately, pecl refuses to install Tensor either on my Macbook Pro >> or >> > on my Ubuntu 20 workstation. Both machines complain about being unable >> to >> > find cblas.h. I ran 'sudo pecl install tensor' which has quite a bit o= f >> > output. The problem seems to happen when it attempts to run make: >> > >> > running: make >> > /bin/bash /tmp/pear/temp/pear-build-root7MZ6PH/tensor-3.0.2/libtool >> > --mode=3Dcompile cc -I. -I/tmp/pear/temp/tensor/ext >> > -I/tmp/pear/temp/pear-build-root7MZ6PH/tensor-3.0.2/include >> > -I/tmp/pear/temp/pear-build-root7MZ6PH/tensor-3.0.2/main >> > -I/tmp/pear/temp/tensor/ext -I/usr/include/php/20210902 >> > -I/usr/include/php/20210902/main -I/usr/include/php/20210902/TSRM >> > -I/usr/include/php/20210902/Zend -I/usr/include/php/20210902/ext >> > -I/usr/include/php/20210902/ext/date/lib -DHAVE_CONFIG_H -g -O2 -O= 3 >> > -ffast-math -DZEND_COMPILE_DL_EXT=3D1 -c >> /tmp/pear/temp/tensor/ext/tensor.c >> > -o tensor.lo -MMD -MF tensor.dep -MT tensor.lo >> > libtool: compile: cc -I. -I/tmp/pear/temp/tensor/ext >> > -I/tmp/pear/temp/pear-build-root7MZ6PH/tensor-3.0.2/include >> > -I/tmp/pear/temp/pear-build-root7MZ6PH/tensor-3.0.2/main >> > -I/tmp/pear/temp/tensor/ext -I/usr/include/php/20210902 >> > -I/usr/include/php/20210902/main -I/usr/include/php/20210902/TSRM >> > -I/usr/include/php/20210902/Zend -I/usr/include/php/20210902/ext >> > -I/usr/include/php/20210902/ext/date/lib -DHAVE_CONFIG_H -g -O2 -O3 >> > -ffast-math -DZEND_COMPILE_DL_EXT=3D1 -c >> /tmp/pear/temp/tensor/ext/tensor.c >> > -MMD -MF tensor.dep -MT tensor.lo -fPIC -DPIC -o .libs/tensor.o >> > /tmp/pear/temp/tensor/ext/tensor.c:25:10: fatal error: cblas.h: No suc= h >> > file or directory >> > 25 | #include "cblas.h" >> > | ^~~~~~~~~ >> > compilation terminated. >> > make: *** [Makefile:208: tensor.lo] Error 1 >> > ERROR: `make' failed >> >> I think you need to install the OpenBLAS dev package[1]. >> >> If in doubt, file an issue at the tensor bug tracker[2]. >> >> [1] >> [2] >> >> -- >> Christoph M. Becker >> > --000000000000e45ae005f1785564--