Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 21 21:41
    czhangdev starred Syncleus/aparapi
  • Jul 13 06:51
    dependabot[bot] labeled #5
  • Jul 13 06:51
    dependabot[bot] opened #5
  • Jul 13 06:51

    dependabot[bot] on bundler

    Bump addressable from 2.7.0 to … (compare)

  • Jul 12 17:18

    freemo on master

    build(release): preparing readm… build(release): Bumped version … (compare)

  • Jul 12 17:12

    freemo on v3.0.0

    build(release): preparing readm… build(release): releasing versi… (compare)

  • Jul 12 16:58

    freemo on master

    Bumped snapshot version of the … doc: added contributing documen… (compare)

  • Jul 12 16:50

    freemo on master

    build: bumped parent pom to rel… (compare)

  • Jul 12 16:23

    freemo on master

    build(release): Updating versio… build(release): bumping snapsho… (compare)

  • Jul 12 16:15

    freemo on v3.0.0

    build(release): Updating versio… build(release): preparing pom a… (compare)

  • Jul 12 16:03

    freemo on master

    build: bumped parent pom to rel… (compare)

  • Jul 12 15:57

    freemo on master

    build: Moved from aparapi-jni s… (compare)

  • Jul 12 15:52

    freemo on master

    Release: Updated readme in prep… build(release): Bumping snapsho… (compare)

  • Jul 12 15:46

    freemo on v1.4.3

    Release: Updated readme in prep… build(release): version 1.4.3 (compare)

  • Jul 12 15:31

    freemo on master

    doc: Added CONTRIBUTING.md file… (compare)

  • Jul 12 15:29

    freemo on master

    build: Moved from SNAPSHOT pare… (compare)

  • Jul 12 15:14

    freemo on master

    Build: Bumped version to 3.0.0 … build: Updated dependency versi… (compare)

  • Jul 12 15:09

    freemo on master

    doc: Changed version in changel… (compare)

  • Jul 12 15:07

    freemo on master

    doc: Fixed all javadocs. (compare)

  • Jul 07 07:50
    ivan-vasilev removed as member
CoreRasurae
@CoreRasurae
@sseehh_gitlab Use this for your kernel int maxSize = kernel.getKernelMaxWorkGroupSize(openCLDevice); you will see that it will return 256. You get 1024 because that is what NVIDIA driver reports by default and openCLDevice.getMaxWorkGroupSize(); can only report that default value.
Jeffrey Phillips Freeman
@freemo
@grfrost sseehh is a good friend of mine. He is a great contributor to many projects in the past and I am sure has nothing but intentions to help. He does have a tendency to just "spew" ideas as they come to him and I doubt he has any intent other than to just share his thoughts as he works on this. He probably has no issue if most/all of his ideas dont stick but usually takes the approach that its worth mentioning and see where it lands. I think its more of just a "hey did you guys consider this, it worked well in other projects".. I dont think its meant to suggest those projects are better in any way.
John
@devdudejohn

Hi, I've been trying to get this to work for quite a while now:

package com.johnomeara.apararitest;

import com.aparapi.Kernel;

public class Start {
    public static void main(String[] args){
        Kernel kernel = new Kernel() {
            @Override
            public void run() {
                int gid = getGlobalId();
                System.out.println(gid);
            }
        };

        kernel.execute(100);
    }
}

I'm getting this error:

Jul 04, 2021 12:53:16 PM com.aparapi.internal.model.ClassModel$AttributePool <init>
WARNING: Found unexpected Attribute (name = NestHost)
Jul 04, 2021 12:53:16 PM com.aparapi.internal.kernel.KernelRunner fallBackToNextDevice
WARNING: Device failed for Start$1, devices={Intel<GPU>|Java Alternative Algorithm|Java Thread Pool}: Object array elements cannot contain
com.aparapi.internal.exception.ClassParseException: Object array elements cannot contain
    at com.aparapi.internal.model.Entrypoint.updateObjectMemberFieldAccesses(Entrypoint.java:313)
    at com.aparapi.internal.model.Entrypoint.<init>(Entrypoint.java:641)
    at com.aparapi.internal.model.ClassModel.computeBasicEntrypoint(ClassModel.java:3059)
    at com.aparapi.internal.model.ClassModel$6.compute(ClassModel.java:3040)
    at com.aparapi.internal.model.ClassModel$6.compute(ClassModel.java:3038)
    at com.aparapi.internal.model.ValueCache.computeIfAbsent(ValueCache.java:50)
    at com.aparapi.internal.model.ClassModel.getEntrypoint(ClassModel.java:3048)
    at com.aparapi.internal.model.ClassModel.getEntrypoint(ClassModel.java:3067)
    at com.aparapi.internal.kernel.KernelRunner.executeInternalInner(KernelRunner.java:1475)
    at com.aparapi.internal.kernel.KernelRunner.executeInternalOuter(KernelRunner.java:1383)
    at com.aparapi.internal.kernel.KernelRunner.execute(KernelRunner.java:1374)
    at com.aparapi.Kernel.execute(Kernel.java:2897)
    at com.aparapi.Kernel.execute(Kernel.java:2854)
    at com.aparapi.Kernel.execute(Kernel.java:2829)
    at com.johnomeara.apararitest.Start.main(Start.java:15)
Jul 04, 2021 12:53:16 PM com.aparapi.internal.kernel.KernelRunner fallBackToNextDevice
WARNING: Trying next device: Java Alternative Algorithm
0
8
16
24
32
40
48
56
64
72
80
88
2
10
18
26
34
42
50
58
66
74
82
90
1
9
17
25
33
41
49
57
65
73
81
89
6
14
22
30
38
46
54
62
70
78
86
94
7
15
23
31
39
47
55
63
71
79
87
95
3
11
19
27
35
43
51
59
67
75
83
91
4
12
20
28
36
44
52
60
68
76
84
92
5
13
21
29
37
45
53
61
69
77
85
93

Process finished with exit code 0

It works, but it fails to use my Intel Integrated UHD Graphics. Any help would be overwhelmingly appericated.

CoreRasurae
@CoreRasurae
@devdudejohn You cannot use println with Aparapi kernels, which means that your execution does a fallback for Java mode, and as such it won't use the GPU.
PM com.aparapi.internal.kernel.KernelRunner fallBackToNextDevice
WARNING: Device failed for Start$1, devices={Intel<GPU>|Java Alternative Algorithm|Java Thread Pool}: Object array elements cannot contain
com.aparapi.internal.exception.ClassParseException: Object array elements cannot contain
John
@devdudejohn
Ah, that makes sense! Thank you!
grfrost
@grfrost
@freemo then I probably owe @sseehh_gitlab an apology... I did interpret the questions as snarky. So @sseeh please accept my apologies. I have worked in this area for a while and occasionally some 'ego' pops out ;)
Jeffrey Phillips Freeman
@freemo
still working on getting this version out... made some headway need a new hardware-key should arrive tomorrow
hopefully will have it deployed tomorrow if this new key works better
Jeffrey Phillips Freeman
@freemo
YAY! Finally got my keys working and it was the stupidest thing!
Boo non-descriptive errors!
anyway should have release done by end of day now if no other roadblocks
Jeffrey Phillips Freeman
@freemo
I have now just fixed all the broken javadocs in the aparapi-examples.. along with the earlier fixes in aparapi proper the javadocs should now compile just fine and that stage no longer need be skipped.
Jeffrey Phillips Freeman
@freemo
@/all Aparapi version 3.0.0 has just been released, it is now active in maven central and the release files are also on the gitlab. This also includes a new version of aparapi-jni which is likewise deployed. aparapi-examples will be deployed as well in the next few minutes. The new version fixes some stuff it is highly advised you switch to the newer version. Backwards compatiblity is mostly in-place but there was slight backwards compatibility breaking around work group sizes, but it was needed to fix a bug.
Anyone interested can find the release files here: https://git.qoto.org/aparapi/aparapi/-/releases/v3.0.0
Jeffrey Phillips Freeman
@freemo
aparapi-examples is also now deployed and in the repo... everything should be done!
stefanettim
@stefanettim
checked aparapi and aparapi-examples 3.0.0, OK!
Jeffrey Phillips Freeman
@freemo
@stefanettim excellent, thank you
stefanettim
@stefanettim
@freemo ... and AparapiFractals is working.. :)
Jeffrey Phillips Freeman
@freemo
@stefanettim that is the most important part :)
grfrost
@grfrost
Nice work @freemo
CoreRasurae
@CoreRasurae
@freemo Great! I'll give it a spin, too, just to check if everything looks ok
Jeffrey Phillips Freeman
@freemo
@grfrost Thanks @CoreRasurae Let me know if I need to tweak anything.
grfrost
@grfrost
@freemo & @CoreRasurae some interesting developments in the baritsa tree #1) I have been playing with TaskFlow's work stealing C++ library. It is pretty fast. #2 I realized after inlining and decoding java kernel bytecode to sequences of simple instructions, that we end up with very basic slot to slot moves (stack, load and store operations) and arithmetic operations. That is basically it. I have written a very simple x86 assembler which lays code in memory and allows me to execute. It yields pretty good performance.. especially when I combine with #1 above for threadpooling. So this is an option if no OpenCL exists.
Jeffrey Phillips Freeman
@freemo
@grfrost cant wait to take a look at it. One thing I was about to start doing the usual cleanup I do, create CI, static checks, code coverage frameworks, documentation checks and publishing.. None of it was going to be enforced but I was going to add it so we dont let those things get too far behind and there is no friction to get started... thing is, since your coding against github rather than the aparapi gitlab (doesnt need to be the same repo as aparapi though) it is literally impossible as github doesnt support any sort of GPU capable CI with its built in CI feature.
@grfrost I wouldnt mind paying for a seperate set of servers that use github tool chains to make that happen. But its rather costly (I am already putting in 100$ a month to bring that to main aparapi) and would require me to rebuild the entire toolchain for github... that said I know you want to keep the repo seperate, any objection to moving the repo to the qoto gitlab so I can add all that on without any extra cost using the current infrastructure?
CoreRasurae
@CoreRasurae
@grfrost @freemo That sounds interesting.
I am eager to give it a spin as soon as I find some time.
grfrost
@grfrost

@freemo this may be an option later. I am comfortable with github (I have around 30 repos) and I am paying for it ;) so will leave it there until it is close to viable.
At present I am x86 instruction encoding by hand. That was fun for about 2 hours.
I really only need a subset, but the xmm0 float stuff is hurting my head.

This is an example of the API for handcoding mandel function....

   X64Assembler func;
   func
         ._push(rbp)
         ._mov(rbp, rsp)
         ._mov(esi, imm32(4))
         ._mov(ptr64(rbp, -0x24), edi)
          ._movss(ptr64(rbp, -0x28), xmm0)
         ._mov(ptr64(rbp, -0x2c), esi)
         ._mov(ptr64(rbp, -0x30), edx)
         ._mov(ptr64(rbp, -0x34), ecx)
         ._movss(ptr64(rbp, -0x38), xmm1)
         ._movss(ptr64(rbp, -0x3c), xmm2)
         ._mov(ptr64(rbp, -0x48), r8)
         ._mov(ptr64(rbp, -0x50), r9)
         ._mov(eax, ptr64(rbp, -0x24))
         ._cqd()
         ._idiv(ptr64(rbp, -0x2c))
         ._mov(eax, edx)
        .... 
        ._ret();

int result = func(scale, width height.... etc);
freemo
@freemo:matrix.org
[m]
@grfrost: You can still work with it on github. All the gitlab repos have two-way mirroring with github. So it wont change your workflow. Since we wont be doing pull requests (you commit direct to the repo) the CI should be happy to run on the gitlab clone while the github portion you use as usual. Do you have any other suggestions as to how to get CI up on a pure github instance? I'm ok with whatever.
Jeffrey Phillips Freeman
@freemo
9/redraw
Freemo
@freemo:qoto.org
[m]
I've created a bot we can use in this room, figured it might be useful for repeating information snippets using the !info command (I can add anything relevant as we need it).
!help
Einstein
@einstein:qoto.org
[m]

In order to use this bot just make sure he is in the same room as you and then issue any of the commands he responds to. If you invite him to any room he will automatically join.

The following is a list of commands I will respond to.

ꞏ!info <topic> - Display a predefined message associated with the topic. To see a list of topics use: !info help or !info list
ꞏs/<match pattern>/<replace pattern> - Reply to one of your own messages or someone elses and apply a sed pattern replacement on the message.
ꞏ<number>! - Calculate a factorial
ꞏ<any image> - Will respond with an MCX link to the image
ꞏ!roll <list of dice and math> - Can roll any combination of dice and perform arithmatic on it, for example: !roll 5d6 + 7d3
ꞏ!karma <command> - Keep track of user's karma, and hand it out when you like something. Use the following command for help using the karma command: !karma help
ꞏ!xkcd [search words] - Display an xkcd commic.
ꞏ!echo <text> - Repeats the text to the channel
ꞏ!ping - Responds to the ping wand indicates the latency.
ꞏ!rss <command> - Displays rss feeds, use the following command for help: !rss help
ꞏr/<subreddit> - Will respond with a link to the subreddit
ꞏ!giphy [search words] - Will display a relevant animated gif. If no search words are provided a random gif is displays.
ꞏ!trump <text> - Renders the text as if it were a tweet posted by trump.
ꞏ!poll <command> - Conducts polls in the room. For help on using this command use the following: !poll help
ꞏ!ud <text> - Searches on Urban Dictionary for the phrase and displays it.
ꞏ!reminder <command> - Tells the bot to remind you of something in the future. For help using this command: !reminder help
ꞏ!translate <source lang> <dest lang> <text> - Will translate the given text from source lang to dest lang. Example: !translate en ru hello
ꞏ!gitlab <command> - Allows you to post gitlab status info into the channel. For more info do: !gitlab help
ꞏ!tmdb <command> - Shows tmdb movie database information in channel. For help do: !tmdb help
ꞏ!wolfram <query> - performs a WolframAlpha search (including math) and displays the results.
ꞏ!weather <location> - Displays the weather at the given location.
ꞏ!crypto <coin> - Displays the current price for the specified cryptocurrency. Example: !crypto eth

Notes:
ꞏArguments inside <> are required, arguments inside [] are optional.
ꞏThe bot is rate limited so you can only issue it 5 requests per minute per room (and per user).

Freemo
@freemo:qoto.org
[m]
These are some of his commands if anyone wants to play around (you can invite him into a private room so you can play without spamming).
grfrost
@grfrost
!help
Einstein
@einstein:qoto.org
[m]

In order to use this bot just make sure he is in the same room as you and then issue any of the commands he responds to. If you invite him to any room he will automatically join.

The following is a list of commands I will respond to.

ꞏ!info <topic> - Display a predefined message associated with the topic. To see a list of topics use: !info help or !info list
ꞏs/<match pattern>/<replace pattern> - Reply to one of your own messages or someone elses and apply a sed pattern replacement on the message.
ꞏ<number>! - Calculate a factorial
ꞏ<any image> - Will respond with an MCX link to the image
ꞏ!roll <list of dice and math> - Can roll any combination of dice and perform arithmatic on it, for example: !roll 5d6 + 7d3
ꞏ!karma <command> - Keep track of user's karma, and hand it out when you like something. Use the following command for help using the karma command: !karma help
ꞏ!xkcd [search words] - Display an xkcd commic.
ꞏ!echo <text> - Repeats the text to the channel
ꞏ!ping - Responds to the ping wand indicates the latency.
ꞏ!rss <command> - Displays rss feeds, use the following command for help: !rss help
ꞏr/<subreddit> - Will respond with a link to the subreddit
ꞏ!giphy [search words] - Will display a relevant animated gif. If no search words are provided a random gif is displays.
ꞏ!trump <text> - Renders the text as if it were a tweet posted by trump.
ꞏ!poll <command> - Conducts polls in the room. For help on using this command use the following: !poll help
ꞏ!ud <text> - Searches on Urban Dictionary for the phrase and displays it.
ꞏ!reminder <command> - Tells the bot to remind you of something in the future. For help using this command: !reminder help
ꞏ!translate <source lang> <dest lang> <text> - Will translate the given text from source lang to dest lang. Example: !translate en ru hello
ꞏ!gitlab <command> - Allows you to post gitlab status info into the channel. For more info do: !gitlab help
ꞏ!tmdb <command> - Shows tmdb movie database information in channel. For help do: !tmdb help
ꞏ!wolfram <query> - performs a WolframAlpha search (including math) and displays the results.
ꞏ!weather <location> - Displays the weather at the given location.
ꞏ!crypto <coin> - Displays the current price for the specified cryptocurrency. Example: !crypto eth

Notes:
ꞏArguments inside <> are required, arguments inside [] are optional.
ꞏThe bot is rate limited so you can only issue it 5 requests per minute per room (and per user).

grfrost
@grfrost
Nice ;) especially !trump
Freemo
@freemo:qoto.org
[m]
!trump I wonder, and I am the best at wondering, if that will even work, you know, like things used to, really work, on gitter. It should because I'm the best at gittering too.
Einstein
@einstein:qoto.org
[m]
Freemo
@freemo:qoto.org
[m]
@grfrost: did that work?
grfrost
@grfrost
Exactly how I imagined. Donald ? Is that you?
Freemo
@freemo:qoto.org
[m]
hehe :)
Firok
@351768593
ahha! Finally I found the reason causing mem-leaking of my code
it seems kernel.cleanUpArrays() won't release any array passed to JNI
for a kernel enabled explicit buffer management, codes below will cause mem-leak issue:
public void doSomething(Range range)
{
    put(buffer = new int[1920 * 1080]);
    execute(range);
    get(buffer);
    cleanUpArrays();
}
Firok
@351768593
is there an API to manually release the old buffer array at first?
or we should use a bigger buffer and reuse it by System.arraycopy you mentioned before? @grfrost
grfrost
@grfrost
@351768593 looks like a bug which needs fixing.
Freemo
@freemo:qoto.org
[m]
351768593 (Firok):Would you mind filing an issue report?
Firok
@351768593
2 replies