Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 403
    • Issues 403
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #1219
Closed
Open
Created Jun 08, 2012 by Miguel Sousa Diogo@msdGuest

expar optimization ends sac2c prematurely

Bugzilla Link 976
Created on Jun 08, 2012 15:47
Version svn
OS All
Architecture PC
Attachments Terminal_Saved_Output.txt

Extended Description

Created an attachment (id=899)
Full console output
A toy sample program I used to study the CUDA backend transformations does not compile with the flag -doexpar, sorry for not reporting this earlier. The compiler exists with the following message:
$ sac2c -target MBpro_cuda mt_cuda.sac -doexpar -dopfd
...
** 20: Preparing C code generation ...
  **** CUDA Prepare kernel generation ...
  **** Marking memval identifiers ...
  **** CUDA Adjust return ids of single threaded kernel ...
cuda/adjust_stknl_rets.c:486 Assertion "!TUisScalar( AVIS_TYPE( ID_AVIS( ret_id)))" failed!
Scalar found in N_return!
The code for mt_cuda.sac:
inline
int add( int a, int b) {
  return( _add_SxS_( a, b));
}
int main( ) 
{
 x = 1;
 foo = with {
                ([1,1] <= iv=[i,j] < [40960,4096]) {
                  res = 20;
                }:res;
              }:genarray([40960, 20000], 0); 
 y = add(x,_sel_VxA_([1,20],foo));
 foo = with {
                ([0,10] <= iv=[i,j] < [40960,4000]) {
                  res = 0;
                }:res;
              }:modarray(foo); 
  z= add(y,_sel_VxA_([1,2],foo));
  w = with {([0,0] <= iv < [40960,20000]): _sel_VxA_(iv,foo);}: fold( add, 0);
  return( add(z,w));
}
I'm attaching the full console output of sac2c too. I'm using latest version from svn (rev. 17876).
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking